summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-02 02:04:51 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-02 02:04:51 +0000
commit326e1fa13b1451bb227b6e279cb66f60d801169f (patch)
treef4f5b840387d353fb031f552c7d2ee98615e8a07
parent94c1d7f1746a10bad26b86a33927ae2cde11f6ac (diff)
downloadbcm5719-llvm-326e1fa13b1451bb227b6e279cb66f60d801169f.tar.gz
bcm5719-llvm-326e1fa13b1451bb227b6e279cb66f60d801169f.zip
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. llvm-svn: 205386
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 9deb2f50f57..11345eb288a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2709,7 +2709,9 @@ DwarfTypeUnit *DwarfDebug::constructSkeletonTU(DwarfTypeUnit *TU) {
// 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
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index dc3917b5857..97f251086ae 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -2040,7 +2040,7 @@ void DwarfUnit::emitHeader(const MCSymbol *ASectionSym) const {
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());
OpenPOWER on IntegriCloud