[PATCH] Emit correct linkage-name attribute based on DWARF version.

Paul Robinson Paul_Robinson at playstation.sony.com
Tue Mar 10 14:38:40 PDT 2015


================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1281
@@ +1280,3 @@
+    addString(SPDie,
+              DD->getDwarfVersion() >= 4 ? dwarf::DW_AT_linkage_name
+                                         : dwarf::DW_AT_MIPS_linkage_name,
----------------
echristo wrote:
> dblaikie wrote:
> > Should we pull this out into a utility function somewhere? "addLinkageNameString" ? (it could do the attribute choosing, and the "getRealLinkageName" Call as well, perhaps)
> Yes. Agreed, it's almost assuredly why it's like this in the first place.
Okay.  I can add it to DwarfUnit, and it will be usable from DwarfCompileUnit (the other place that adds a linkage name).

http://reviews.llvm.org/D8227

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list