[PATCH] D85731: [NFC][builtins] Make softfloat-related errors less noisy

Anatoly Trosinenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 02:44:10 PDT 2020


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
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85731.286513.patch
Type: text/x-patch
Size: 1180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200819/14138ced/attachment-0001.bin>


More information about the cfe-commits mailing list