Displaying 2 results from an estimated 2 matches for "l2668".
Did you mean:
2668
2020 Apr 10
2
[RFC] Usage of NDEBUG as a guard for non-assert debug code
On 2020-04-10, Michael Kruse via llvm-dev wrote:
>#ifndef NDEBUG in the LLVM source and assert() are at least somewhat
>linked. For instance, consider
>https://github.com/llvm/llvm-project/blob/8423a6f36386aabced2a367c0ea53487901d31ca/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp#L2668
>
>The #ifndef NDEBUG is used to guard the value that checked in an
>assert() later. Only enabling assert() will cause the build to fail
>because the value is not defined. Another example is a loop only for
>the assert, eg.
>
> #ifndef NDEBUG
> for (auto &Val : Con...
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