[llvm] r205386 - Adjust comments regarding non-relocated abbrev offset in debug_info.dwo
David Blaikie
dblaikie at gmail.com
Tue Apr 1 19:04:51 PDT 2014
Author: dblaikie
Date: Tue Apr 1 21:04:51 2014
New Revision: 205386
URL: http://llvm.org/viewvc/llvm-project?rev=205386&view=rev
Log:
Adjust comments regarding non-relocated abbrev offset in debug_info.dwo
I'm not sure the comment in the implementation really adds a lot of
value (it's clear that we emit zero when no symbol is provided, but it
doesn't explain why we would do that). Happy to iterate.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=205386&r1=205385&r2=205386&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Apr 1 21:04:51 2014
@@ -2709,7 +2709,9 @@ DwarfTypeUnit *DwarfDebug::constructSkel
// compile units that would normally be in debug_info.
void DwarfDebug::emitDebugInfoDWO() {
assert(useSplitDwarf() && "No split dwarf debug info?");
- InfoHolder.emitUnits(this, nullptr);
+ // Don't pass an abbrev symbol, using a constant zero instead so as not to
+ // emit relocations into the dwo file.
+ InfoHolder.emitUnits(this, /* AbbrevSymbol */nullptr);
}
// Emit the .debug_abbrev.dwo section for separated dwarf. This contains the
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=205386&r1=205385&r2=205386&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Tue Apr 1 21:04:51 2014
@@ -2040,7 +2040,7 @@ void DwarfUnit::emitHeader(const MCSymbo
if (ASectionSym)
Asm->EmitSectionOffset(ASectionSym, ASectionSym);
else
- // Use a constant value in the dwo file, to avoid relocations
+ // Use a constant value when no symbol is provided.
Asm->EmitInt32(0);
Asm->OutStreamer.AddComment("Address Size (in bytes)");
Asm->EmitInt8(Asm->getDataLayout().getPointerSize());
More information about the llvm-commits
mailing list