atrosinenko updated this revision to Diff 286513. atrosinenko added a comment.
Rebase the entire patch stack against the up-to-date master and re-upload. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85731/new/ https://reviews.llvm.org/D85731 Files: compiler-rt/lib/builtins/fp_lib.h Index: compiler-rt/lib/builtins/fp_lib.h =================================================================== --- compiler-rt/lib/builtins/fp_lib.h +++ compiler-rt/lib/builtins/fp_lib.h @@ -26,6 +26,15 @@ #include <stdbool.h> #include <stdint.h> +#if (defined(SINGLE_PRECISION) + defined(DOUBLE_PRECISION) + \ + defined(QUAD_PRECISION)) != 1 +#error Exactly one of SINGLE_PRECISION, DOUBLE_PRECISION or QUAD_PRECISION must be defined. +// Now, turn on some arbitrary one of the three precision settings (except for +// QUAD_PRECISION that has some specific requirements), so fp_*_impl.inc files +// could be validated by clang-tidy in a more meaningful way. +#define SINGLE_PRECISION +#endif + // x86_64 FreeBSD prior v9.3 define fixed-width types incorrectly in // 32-bit mode. #if defined(__FreeBSD__) && defined(__i386__) @@ -195,6 +204,8 @@ #undef Word_FullMask #endif // __LDBL_MANT_DIG__ == 113 && __SIZEOF_INT128__ #else +// Should never be reached due to the check for precison-related macro +// at the top of this file. Recheck it here just in case... #error SINGLE_PRECISION, DOUBLE_PRECISION or QUAD_PRECISION must be defined. #endif
Index: compiler-rt/lib/builtins/fp_lib.h =================================================================== --- compiler-rt/lib/builtins/fp_lib.h +++ compiler-rt/lib/builtins/fp_lib.h @@ -26,6 +26,15 @@ #include <stdbool.h> #include <stdint.h> +#if (defined(SINGLE_PRECISION) + defined(DOUBLE_PRECISION) + \ + defined(QUAD_PRECISION)) != 1 +#error Exactly one of SINGLE_PRECISION, DOUBLE_PRECISION or QUAD_PRECISION must be defined. +// Now, turn on some arbitrary one of the three precision settings (except for +// QUAD_PRECISION that has some specific requirements), so fp_*_impl.inc files +// could be validated by clang-tidy in a more meaningful way. +#define SINGLE_PRECISION +#endif + // x86_64 FreeBSD prior v9.3 define fixed-width types incorrectly in // 32-bit mode. #if defined(__FreeBSD__) && defined(__i386__) @@ -195,6 +204,8 @@ #undef Word_FullMask #endif // __LDBL_MANT_DIG__ == 113 && __SIZEOF_INT128__ #else +// Should never be reached due to the check for precison-related macro +// at the top of this file. Recheck it here just in case... #error SINGLE_PRECISION, DOUBLE_PRECISION or QUAD_PRECISION must be defined. #endif
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits