DwarfDebug::~DwarfDebug() {
}
+/// EmitSectionSym - Switch to the specified MCSection and emit an assembler
+/// temporary label to it if SymbolStem is specified.
+static MCSymbol *EmitSectionSym(AsmPrinter *Asm, const MCSection *Section,
+ const char *SymbolStem = 0) {
+ Asm->OutStreamer.SwitchSection(Section);
+ if (!SymbolStem) return 0;
+
+ MCSymbol *TmpSym = Asm->GetTempSymbol(SymbolStem);
+ Asm->OutStreamer.EmitLabel(TmpSym);
+ return TmpSym;
+}
+
MCSymbol *DwarfDebug::getStringPool() {
return Asm->GetTempSymbol("section_str");
}
return Entry.first = Asm->GetTempSymbol("string", Entry.second);
}
+MCSymbol *DwarfDebug::getDwarfStrSectionSym(void) {
+ if (DwarfStrSectionSym) return DwarfStrSectionSym;
+ DwarfStrSectionSym =
+ EmitSectionSym(Asm, Asm->getObjFileLowering().getDwarfStrSection(),
+ "section_str");
+ return DwarfStrSectionSym;
+}
/// assignAbbrevNumber - Define a unique number for the abbreviation.
///
}
}
-/// EmitSectionSym - Switch to the specified MCSection and emit an assembler
-/// temporary label to it if SymbolStem is specified.
-static MCSymbol *EmitSectionSym(AsmPrinter *Asm, const MCSection *Section,
- const char *SymbolStem = 0) {
- Asm->OutStreamer.SwitchSection(Section);
- if (!SymbolStem) return 0;
-
- MCSymbol *TmpSym = Asm->GetTempSymbol(SymbolStem);
- Asm->OutStreamer.EmitLabel(TmpSym);
- return TmpSym;
-}
-
/// EmitSectionLabels - Emit initial Dwarf sections with a label at
/// the start of each one.
void DwarfDebug::EmitSectionLabels() {