diff options
author | Eric Christopher <echristo@gmail.com> | 2012-12-13 03:00:38 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2012-12-13 03:00:38 +0000 |
commit | 996b2b7ae6116152f55aa1448fdff20dd26654a4 (patch) | |
tree | c5d7b195ee947f8af2f86c7979ce3ca31451f093 /llvm/lib/CodeGen/AsmPrinter | |
parent | 80882db88f82d78df5ddebe626b59c569749e789 (diff) | |
download | bcm5719-llvm-996b2b7ae6116152f55aa1448fdff20dd26654a4.tar.gz bcm5719-llvm-996b2b7ae6116152f55aa1448fdff20dd26654a4.zip |
Use default label name for a section in emitting abbreviation
section to help prep some code to be split about.
llvm-svn: 170088
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 72dc70005bb..e2b5ee60323 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1836,7 +1836,8 @@ void DwarfDebug::emitCompileUnits(const MCSection *Section) { Asm->OutStreamer.AddComment("DWARF version number"); Asm->EmitInt16(dwarf::DWARF_VERSION); Asm->OutStreamer.AddComment("Offset Into Abbrev. Section"); - Asm->EmitSectionOffset(Asm->GetTempSymbol("abbrev_begin"), + const MCSection *ASec = Asm->getObjFileLowering().getDwarfAbbrevSection(); + Asm->EmitSectionOffset(Asm->GetTempSymbol(ASec->getLabelBeginName()), DwarfAbbrevSectionSym); Asm->OutStreamer.AddComment("Address Size (in bytes)"); Asm->EmitInt8(Asm->getDataLayout().getPointerSize()); @@ -1860,10 +1861,11 @@ void DwarfDebug::emitAbbreviations() { // Check to see if it is worth the effort. if (!Abbreviations.empty()) { // Start the debug abbrev section. - Asm->OutStreamer.SwitchSection( - Asm->getObjFileLowering().getDwarfAbbrevSection()); + const MCSection *ASec = Asm->getObjFileLowering().getDwarfAbbrevSection(); + Asm->OutStreamer.SwitchSection(ASec); - Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("abbrev_begin")); + MCSymbol *Begin = Asm->GetTempSymbol(ASec->getLabelBeginName()); + Asm->OutStreamer.EmitLabel(Begin); // For each abbrevation. for (unsigned i = 0, N = Abbreviations.size(); i < N; ++i) { @@ -1880,7 +1882,8 @@ void DwarfDebug::emitAbbreviations() { // Mark end of abbreviations. Asm->EmitULEB128(0, "EOM(3)"); - Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("abbrev_end")); + MCSymbol *End = Asm->GetTempSymbol(ASec->getLabelEndName()); + Asm->OutStreamer.EmitLabel(End); } } |