[PATCH] D12001: Implement __emutls_get_address

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 20:05:27 PDT 2015


compnerd 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)); \
+}
----------------
chh wrote:
> 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.
> 
Er, yes, int_util.h.  That was just a slip up on my part.  The *use* of the macro in your case is target dependent, nothing about the macro is target dependent though.  There is a set of macros that we use pervasively though out the builtins, which are currently consolidated, and this would be the odd one out.


http://reviews.llvm.org/D12001





More information about the llvm-commits mailing list