Skip to content

debug info for MACRO not produced #14524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ochupina mannequin opened this issue Oct 23, 2012 · 4 comments
Open

debug info for MACRO not produced #14524

ochupina mannequin opened this issue Oct 23, 2012 · 4 comments
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@ochupina
Copy link
Mannequin

ochupina mannequin commented Oct 23, 2012

Bugzilla Link 14152
Version trunk
OS MacOS X
Blocks llvm/llvm-bugzilla-archive#24345
Attachments bitcode file
CC @adrian-prantl,@echristo,@zygoloid

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.

@lattner
Copy link
Collaborator

lattner commented Oct 24, 2012

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.

@echristo
Copy link
Contributor

I'm not planning (and don't know of anyone planning) to do this anytime soon, no.

@llvmbot
Copy link
Member

llvmbot commented Feb 13, 2017

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

@llvmbot
Copy link
Member

llvmbot commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#24345

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

3 participants