This is an archive of the discontinued LLVM Phabricator instance.

[MC][BOLT] Add setter for AllowAtInName
ClosedPublic

Authored by Amir on Mar 29 2022, 5:02 PM.

Details

Summary

Use the setter in BOLT to allow printing names with variant kind in the name
(e.g. "func@PLT").
Fixes BOLT buildbot tests that broke after D122516:
https://lab.llvm.org/buildbot/#/builders/215/builds/3595

Diff Detail

Event Timeline

Amir created this revision.Mar 29 2022, 5:02 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: ayermolo. · View Herald Transcript
Amir requested review of this revision.Mar 29 2022, 5:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2022, 5:02 PM
Amir edited the summary of this revision. (Show Details)Mar 29 2022, 5:03 PM
maksfb accepted this revision.Mar 29 2022, 5:09 PM
maksfb added inline comments.
bolt/lib/Core/BinaryContext.cpp
165

nit

This revision is now accepted and ready to land.Mar 29 2022, 5:09 PM

If you look at LLVM itself, normally it refers to PLT entries using an MCSymbolRefExpr marked up with MCSymbolRefExpr::VK_PLT. Ideally, BOLT would do the same thing... but maybe not worth the effort. Symbols with an "@" sign shouldn't show up in practice on non-Windows targets.

If you look at LLVM itself, normally it refers to PLT entries using an MCSymbolRefExpr marked up with MCSymbolRefExpr::VK_PLT. Ideally, BOLT would do the same thing... but maybe not worth the effort. Symbols with an "@" sign shouldn't show up in practice on non-Windows targets.

Since BOLT operates on a post-link binary, it sees PLT entries created by the linker and marks them with "sym@PLT", i.e. there will be both - undefined "sym" and defined "sym@PLT". In theory, we can use VK_PLT, but on the surface it looks as it will create more problems for BOLT.

Amir updated this revision to Diff 419135.Mar 30 2022, 7:27 AM

Address nit

Amir marked an inline comment as done.Mar 30 2022, 7:27 AM
This revision was landed with ongoing or failed builds.Mar 30 2022, 1:04 PM
This revision was automatically updated to reflect the committed changes.