[LLVMdev] about NDEBUG

Duncan Sands baldrick at free.fr
Thu Jan 6 23:56:12 PST 2011


Hi Li Qingan,

> I have built and installed llvm-2.8 in debug mode using:
> 
>>SRC_DIR/configure --prefix=INS_DIR --enable-debug-runtime --disable-optimized 
> --enable-debug-symbols
> 
>>make install
> 
> 
> It seems the NDEBUG controls a lot of print-out of debug information, by using 
> DEBUG() or dbgs().
> 
> And it is said that NDEBUG is in enabled in debug mode, but I find it does not 
> work and the -debug option is not recognized. How should I enable NDEBUG or 
> enable DEBUG() and dbgs()? Should I define NDEBUG in the .cpp files related, 
> when I need the debug information?

actually it is the opposite: NDEBUG is enabled when not in debug mode.  The "N" in
NDEBUG stands for "Not".

Ciao, Duncan.



More information about the llvm-dev mailing list