[llvm-commits] [llvm] r170088 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Eric Christopher
echristo at gmail.com
Wed Dec 12 19:00:38 PST 2012
Author: echristo
Date: Wed Dec 12 21:00:38 2012
New Revision: 170088
URL: http://llvm.org/viewvc/llvm-project?rev=170088&view=rev
Log:
Use default label name for a section in emitting abbreviation
section to help prep some code to be split about.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=170088&r1=170087&r2=170088&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Dec 12 21:00:38 2012
@@ -1836,7 +1836,8 @@
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 @@
// 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 @@
// 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);
}
}
More information about the llvm-commits
mailing list