Open 2094601b-373c-43bf-9fad-2557fa9f70d5 opened 12 years ago
mentioned in issue llvm/llvm-bugzilla-archive#24345
Debug info macros is already support in dwarf4 format starting from revision 294637.
In order to enable debug info macros you can use -fdebug-macro flag with -g. In fact, this flag will work with all debug info flags other than -g0.
If we want to be compatible with GCC, we need to enable debug info macros when using -g3. To do that, we need to map "-g3" to "-cc1 -debug-info-macro -debug-info-kind=standalone".
I am not planing to do that though.
Regards, Amjad
I'm not planning (and don't know of anyone planning) to do this anytime soon, no.
I don't know of anyone planning to do this, but it is generally only produced when using "-g3" since it bloats generated debug information significantly.
Extended Description
Consider the test:
$ cat test2.c
define ADD1(x) (x+1)
int n = 0; int main(int argc) { int n = ADD1(argc); return n; }
Macro ADD1 is not mentioned in debug info for test2.c. Are there any plans on adding debug info for macros in clang?
Compilation line: clang -g -O0 test2.c -emit-llvm -o test2.bc -S
Olga Chupina
Software Engineer Intel Compiler Team Intel Corp.