-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
DebugInfo: Add the name as-written, separate from the mangled name #4253
Conversation
Hold off on this got this a bit messed up with some mangler prototyping leaking in here - don't mind me while I juggle git some more... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Sorry this took a bit to work through.
Note the mangler files are still in the PR, so you'll get one more comment: opt_name -> name? (I assume you were doing opt_name due to the StringRef name, but in this PR it contrasts with name used for the other GetAsStringIfIdentifier)
There's not much mangling happening yet - but Run -> main (and some overloading numbering happening, maybe LLVM is doing that 'helpfully' under the hood?) is enough to demonstrate this improvement/fix. Ah, here it is: at external/_main~llvm_project~llvm-project/llvm/include/llvm/ADT/ilist.h:166 That's where LLVM decides to make a new name (name.number) when asked to create a new global with the same name as an existing global. It's not a valid mangling scheme - since the name won't be stable between different compilations, but it is enough to make single-compilation code build/run for now.
All good - appreciate your patience.
Oh, yeah, wrangling git... OK, force push to remove the commit that added that in.
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! FYI, I think this lost the semi-related change to CHECK in the other name handling, but since you're looking at name mangling already I think it makes sense to just move forward here and deal with that separately.
Head branch was pushed to by a user without write access
There's not much mangling happening yet - but Run -> main (and some overloading numbering happening, maybe LLVM is doing that 'helpfully' under the hood?) is enough to demonstrate this improvement/fix.
Ah, here it is:
That's where LLVM decides to make a new name (name.number) when asked to create a new global with the same name as an existing global.
It's not a valid mangling scheme - since the name won't be stable between different compilations, but it is enough to make single-compilation code build/run for now.