[cfe-dev] DEBUG macro not working in Clang

George Karpenkov via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 14 18:01:34 PDT 2017


Hi All,

I wasn’t able to get the DEBUG macro defined in llvm/lib/Support/Debug.[h|cpp] and documented in LLVM Programmer’s Manual
to work with Clang, either through driver or through the frontend:

clang -cc1 -debug

dies with “no such option”,

and

clang —debug

runs, but the option is ignored.

According to the documentation, using -debug should activate the code inside DEBUG macros, and additionally allow users
to activate them selectively using -debug-only flag.

It definitely did work at some point in the past,
so the change seems like a regression.
Was it removed on purpose?

Thanks,
George


More information about the cfe-dev mailing list