[PATCH] Module flag to suppress the DWARF entries DW_AT_MIPS_linkage_name and DW_AT_linkage_name.

Wolfgang Pieb wolfgang_pieb at playstation.sony.com
Fri Oct 17 12:13:48 PDT 2014


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2326
@@ +2325,3 @@
+void DwarfDebug::parseDwarfGenMetadata(const Module *M) {
+  Value *Val = M->getModuleFlag("Dwarf Gen Flags");
+  if (Val == nullptr)
----------------
dblaikie wrote:
> So debug info already has 2 metadata flags (Dwarf Version and Debug Info Version (the version of the metadata schema)), this is a third, and they're all parsed in different places (interestingly the Dwarf Version is parsed in llvm::Module, but the Debug Info Version is parsed in a standalone function (in lib/DebugInfo) llvm::getDebugMetadataVersionFromModule) and this third will be a new place again.
> 
> Perhaps these should go somewhere common? Certainly the string constants should be written once (not repeated in every client of LLVM that wants to use them).
It certainly seems that way. Being an llvm newbie I'm a bit hesitant to suggest more encompassing changes, but I'd be happy to give it a try.

================
Comment at: test/DebugInfo/suppress-linkage-entries.ll:52
@@ +51,3 @@
+!13 = metadata !{i32 2, metadata !"Debug Info Version", i32 1}
+!14 = metadata !{i32 6, metadata !"Dwarf Gen Flags", metadata !15}
+!15 = metadata !{metadata !"suppress-linkage-names"}
----------------
dblaikie wrote:
> I'm guessing this '6' is a merge specifier? What kind of merging does this designate?
It's Module::ModFlagBehavior::AppendUnique, i.e. during a merge values from 2 lists will be appended but duplicates will be dropped.

http://reviews.llvm.org/D5510






More information about the llvm-commits mailing list