diff options
| author | David Blaikie <dblaikie@gmail.com> | 2013-12-04 18:12:28 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2013-12-04 18:12:28 +0000 |
| commit | 91db9ab1b4eb0411867e49ad9c9c57f433e0714b (patch) | |
| tree | 08b3ede0cd8ddd5a50e062c4527f09284e328026 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | |
| parent | cbb51dacfbedf433bd481b6b2e308ac699ac8419 (diff) | |
| download | bcm5719-llvm-91db9ab1b4eb0411867e49ad9c9c57f433e0714b.tar.gz bcm5719-llvm-91db9ab1b4eb0411867e49ad9c9c57f433e0714b.zip | |
DebugInfo: Remove unused start/end labels for the debug_abbrevs section
Since we always emit only one abbrevation section (shared by all the
compilation units in this module) there's no need for a separate label
at the start of each one (and we weren't using the CU ID anyway, so
there really was only one label). Use the section label instead and drop
the wholely unused debug_abbrev_end label.
llvm-svn: 196394
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index d65862040c5..d3504f8a8f6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1980,8 +1980,10 @@ void Unit::emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) { Asm->OutStreamer.AddComment("DWARF version number"); Asm->EmitInt16(DD->getDwarfVersion()); Asm->OutStreamer.AddComment("Offset Into Abbrev. Section"); - Asm->EmitSectionOffset(Asm->GetTempSymbol(ASection->getLabelBeginName()), - ASectionSym); + // We share one abbreviations table across all compilation units so it's + // always at the start of the section. Use a relocatable offset where needed + // to ensure linking doesn't invalidate that offset. + Asm->EmitSectionOffset(ASectionSym, ASectionSym); Asm->OutStreamer.AddComment("Address Size (in bytes)"); Asm->EmitInt8(Asm->getDataLayout().getPointerSize()); } |

