search for: dllvm_assertions_enabled

Displaying 2 results from an estimated 2 matches for "dllvm_assertions_enabled".

2020 Apr 09
2
[RFC] Usage of NDEBUG as a guard for non-assert debug code
...VM_ASSERT) > > > If we have custom asserts, then we can have custom assert guard macros: > > > > // true if this is any sort of debug build > > LLVM_DEBUG_BUILD > > > > // true if asserts are turned on (Debug build on Windows, > > // Debug build or -DLLVM_ASSERTIONS_ENABLED=TRUE on other platforms) > > LLVM_ASSERTS_ENABLED > > > > These flags could be derived from just CMAKE_BUILD_TYPE, and > LLVM_ENABLE_ASSERTIONS can go away (assuming we agree that an asserting > build with optimizations and no debug info is worse than useless). > I do...
2020 Apr 09
7
[RFC] Usage of NDEBUG as a guard for non-assert debug code
Hi all, During discussions about assertions in the Flang project, we noticed that there are a lot of cases in LLVM that #ifndef NDEBUG is used as a guard for non-assert code that we want enabled in debug builds. This works fine on its own, however it affects the behaviour of LLVM_ENABLE_ASSERTIONS; since NDEBUG controls whether assertions are enabled or not, a lot of debug code gets enabled in