[PATCH] D12001: Implement __emutls_get_address

Chih-Hung Hsieh via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 10:10:50 PDT 2015


chh added inline comments.

================
Comment at: compiler-rt/lib/builtins/comp_assert.h:20
@@ +19,3 @@
+#define COMPILE_TIME_ASSERT(pred) { \
+    char dummy[(pred) ? 0 : -1] __attribute__((unused)); \
+}
----------------
compnerd wrote:
> Why not just put this in int_lib.h?
Maybe you mean int_util.h?
int_lib.h defines target dependent configuration macros and functions.
int_util.h defines aborting macros and declares aborting functions.
COMPILE_TIME_ASSERT is target independent compile-time checking and does not generate any code.

Now comp_assert.h is only included by one file.
If it is included by multiple files in the future, I think it would be better to separate different functionality into multiple header files.



http://reviews.llvm.org/D12001





More information about the llvm-commits mailing list