-
Notifications
You must be signed in to change notification settings - Fork 742
Tell LLVM to not mangle names if they're already mangled #1063
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
Tell LLVM to not mangle names if they're already mangled #1063
Conversation
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.
Nice one!
Is there a test-case for this? Also, I think this should allow us to simplify the mangling hack we do to unmangle it.
Could you explain about the mangling hack? Edit: |
07d59c8
to
1b6345d
Compare
1b6345d
to
f2b30c8
Compare
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.
Lovely, r=me, thanks a lot!
@bors-servo r+ |
📌 Commit f2b30c8 has been approved by |
…ecified, r=emilio Tell LLVM to not mangle names if they're already mangled LLVM mangles the name by default but functions are already mangled because the `link_name` attribute's value is mangled. Prefixing the name with `\u{1}` should tell LLVM to not mangle it. I originally thought it's a bug in rustc, but it was clarified here: rust-lang/rust#45073
☀️ Test successful - status-travis |
LLVM mangles the name by default but functions are already mangled because the
link_name
attribute's value is mangled.Prefixing the name with
\u{1}
should tell LLVM to not mangle it.I originally thought it's a bug in rustc, but it was clarified here: rust-lang/rust#45073