This is an archive of the discontinued LLVM Phabricator instance.

Emit correct linkage-name attribute based on DWARF version.
ClosedPublic

Authored by probinson on Mar 10 2015, 2:08 PM.

Details

Summary

There are still 4 tests that check for DW_AT_MIPS_linkage_name,
because they specify DWARF 2 or 3 in the module metadata. So, I didn't
create an explicit version-based test for this.

Diff Detail

Event Timeline

probinson updated this revision to Diff 21631.Mar 10 2015, 2:08 PM
probinson retitled this revision from to Emit correct linkage-name attribute based on DWARF version..
probinson updated this object.
probinson edited the test plan for this revision. (Show Details)
probinson added reviewers: echristo, dblaikie, aprantl.
probinson added a subscriber: Unknown Object (MLST).
dblaikie added inline comments.Mar 10 2015, 2:17 PM
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
1288

Should we pull this out into a utility function somewhere? "addLinkageNameString" ? (it could do the attribute choosing, and the "getRealLinkageName" Call as well, perhaps)

echristo added inline comments.Mar 10 2015, 2:24 PM
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
1288

Yes. Agreed, it's almost assuredly why it's like this in the first place.

probinson added inline comments.Mar 10 2015, 2:38 PM
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
1288

Okay. I can add it to DwarfUnit, and it will be usable from DwarfCompileUnit (the other place that adds a linkage name).

probinson updated this revision to Diff 21646.Mar 10 2015, 3:08 PM

Factor out a utility function so the version decision is in one place.

dblaikie accepted this revision.Mar 10 2015, 3:16 PM
dblaikie edited edge metadata.

Looks good - thanks!

This revision is now accepted and ready to land.Mar 10 2015, 3:16 PM
This revision was automatically updated to reflect the committed changes.