[PATCH] D11833: s/NDEBUG/LLVM_NDEBUG/ in most places

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 15:46:32 PDT 2015


Tom Stellard via llvm-commits <llvm-commits at lists.llvm.org> writes:
> tstellarAMD created this revision.
> tstellarAMD added reviewers: echristo, chandlerc, beanz.
> tstellarAMD added a subscriber: llvm-commits.
> Herald added subscribers: qcolombet, MatzeB.
>
> The goal of this change is to remove the dependency on NDEBUG in
> headers, so that library users can freely choose whether or not to
> define this value when building their applications.

This seems reasonable, but I'm afraid it might have issues regarding
assert() in headers. For example, an assert() in a header that refers to
some state that's guarded by LLVM_DEBUG seems like it'd be a problem.
How do we handle or avoid running into problems from this kind of thing?

There was some related discussion several years back that rejected the
"obvious" solution of avoiding the issue by inventing our own assert:

  http://lists.llvm.org/pipermail/cfe-dev/2013-November/033422.html

Thread starts here:

  http://lists.llvm.org/pipermail/cfe-dev/2013-November/033306.html

> http://reviews.llvm.org/D11833


More information about the llvm-commits mailing list