diff options
Diffstat (limited to 'include/llvm/Support/Compiler.h')
-rw-r--r-- | include/llvm/Support/Compiler.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index 55148a490c29..a56bc93e111b 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -343,7 +343,7 @@ /// int k; /// long long l; /// }; -/// LLVM_PACKED_END +/// LLVM_PACKED_END #ifdef _MSC_VER # define LLVM_PACKED(d) __pragma(pack(push, 1)) d __pragma(pack(pop)) # define LLVM_PACKED_START __pragma(pack(push, 1)) @@ -445,6 +445,9 @@ void AnnotateIgnoreWritesEnd(const char *file, int line); /// \brief Mark debug helper function definitions like dump() that should not be /// stripped from debug builds. +/// Note that you should also surround dump() functions with +/// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always +/// get stripped in release builds. // FIXME: Move this to a private config.h as it's not usable in public headers. #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED @@ -461,7 +464,7 @@ void AnnotateIgnoreWritesEnd(const char *file, int line); #define LLVM_PRETTY_FUNCTION __FUNCSIG__ #elif defined(__GNUC__) || defined(__clang__) #define LLVM_PRETTY_FUNCTION __PRETTY_FUNCTION__ -#else +#else #define LLVM_PRETTY_FUNCTION __func__ #endif |