Including llvm headers without NDEBUG defined and then linking to LLVM dynamic libraries compiled with NDEBU leads to runtime errors that are extremely difficult to analyze. Such a bug recently occurred in tool/CommandInfo.cpp when using CallGraphNode.
Build systems must detect whether NDEBUG was defined in compilation time of LLVM, and define LLVM_WITH_NDEBUG in Config.h accordingly.
All llvm includes must be guarded withh LLVM_INCLUDE_BEGIN and LLVM_INCLUDE_END, which define NDEBUG and undefine it if necessary.
Including llvm headers without NDEBUG defined and then linking to LLVM dynamic libraries compiled with NDEBU leads to runtime errors that are extremely difficult to analyze. Such a bug recently occurred in tool/CommandInfo.cpp when using CallGraphNode.
Build systems must detect whether NDEBUG was defined in compilation time of LLVM, and define LLVM_WITH_NDEBUG in Config.h accordingly.
All llvm includes must be guarded withh LLVM_INCLUDE_BEGIN and LLVM_INCLUDE_END, which define NDEBUG and undefine it if necessary.