[PATCH] Use the DWARF form DW_FORM_sec_offset or DW_FORM_data4 depending on the Dwarf version being generated

Eric Christopher echristo at gmail.com
Mon Nov 18 18:12:12 PST 2013



================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:234
@@ +233,3 @@
+                                  const MCSymbol *Label) {
+  if (DD->getDwarfVersion() >= 4)
+    addLabel(Die, Attribute, dwarf::DW_FORM_sec_offset, Label);
----------------
I do apologize for the lateness of this comment, but rather than bringing this into addLabel I'd prefer we have a "getSectionOffset()" function that will return the proper form that can be used at the call site. Either that or make these function something like "addSectionOffset". Probably prefer the latter, but I'd want that patch to be more uniform across all of the additions.

Make sense? That possible in the time you have?


http://llvm-reviews.chandlerc.com/D2180



More information about the llvm-commits mailing list