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

David Blaikie dblaikie at gmail.com
Fri Oct 17 11:22:03 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)
----------------
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).

================
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"}
----------------
I'm guessing this '6' is a merge specifier? What kind of merging does this designate?

http://reviews.llvm.org/D5510






More information about the llvm-commits mailing list