// Standard sections final addresses.
Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getTextSection());
- EmitLabel("text_end", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("text_end"));
Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getDataSection());
- EmitLabel("data_end", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("data_end"));
// End text sections.
for (unsigned i = 1, N = SectionMap.size(); i <= N; ++i) {
Asm->OutStreamer.SwitchSection(SectionMap[i]);
- EmitLabel("section_end", i);
+ Asm->OutStreamer.EmitLabel(getDWLabel("section_end", i));
}
// Emit common frame information.
collectVariableInfo();
// Assumes in correct section after the entry point.
- EmitLabel("func_begin", ++SubprogramCount);
+ Asm->OutStreamer.EmitLabel(getDWLabel("func_begin", ++SubprogramCount));
// Emit label for the implicitly defined dbg.stoppoint at the start of the
// function.
if (CurrentFnDbgScope) {
// Define end label for subprogram.
- EmitLabel("func_end", SubprogramCount);
+ Asm->OutStreamer.EmitLabel(getDWLabel("func_end", SubprogramCount));
// Get function line info.
if (!Lines.empty()) {
// Dwarf sections base addresses.
if (MAI->doesDwarfRequireFrameSection()) {
Asm->OutStreamer.SwitchSection(TLOF.getDwarfFrameSection());
- EmitLabel("section_debug_frame", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_debug_frame"));
}
Asm->OutStreamer.SwitchSection(TLOF.getDwarfInfoSection());
- EmitLabel("section_info", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_info"));
Asm->OutStreamer.SwitchSection(TLOF.getDwarfAbbrevSection());
- EmitLabel("section_abbrev", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_abbrev"));
Asm->OutStreamer.SwitchSection(TLOF.getDwarfARangesSection());
- EmitLabel("section_aranges", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_aranges"));
if (const MCSection *LineInfoDirective = TLOF.getDwarfMacroInfoSection()) {
Asm->OutStreamer.SwitchSection(LineInfoDirective);
- EmitLabel("section_macinfo", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_macinfo"));
}
Asm->OutStreamer.SwitchSection(TLOF.getDwarfLineSection());
- EmitLabel("section_line", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_line"));
Asm->OutStreamer.SwitchSection(TLOF.getDwarfLocSection());
- EmitLabel("section_loc", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_loc"));
Asm->OutStreamer.SwitchSection(TLOF.getDwarfPubNamesSection());
- EmitLabel("section_pubnames", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_pubnames"));
Asm->OutStreamer.SwitchSection(TLOF.getDwarfPubTypesSection());
- EmitLabel("section_pubtypes", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_pubtypes"));
Asm->OutStreamer.SwitchSection(TLOF.getDwarfStrSection());
- EmitLabel("section_str", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_str"));
Asm->OutStreamer.SwitchSection(TLOF.getDwarfRangesSection());
- EmitLabel("section_ranges", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("section_ranges"));
Asm->OutStreamer.SwitchSection(TLOF.getTextSection());
- EmitLabel("text_begin", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("text_begin"));
Asm->OutStreamer.SwitchSection(TLOF.getDataSection());
- EmitLabel("data_begin", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("data_begin"));
}
/// emitDIE - Recusively Emits a debug information entry.
DIE *Die = ModuleCU->getCUDie();
// Emit the compile units header.
- EmitLabel("info_begin", ModuleCU->getID());
+ Asm->OutStreamer.EmitLabel(getDWLabel("info_begin", ModuleCU->getID()));
// Emit size of content not including length itself
unsigned ContentSize = Die->getSize() +
Asm->EmitInt8(0); EOL("Extra Pad For GDB");
Asm->EmitInt8(0); EOL("Extra Pad For GDB");
Asm->EmitInt8(0); EOL("Extra Pad For GDB");
- EmitLabel("info_end", ModuleCU->getID());
+ Asm->OutStreamer.EmitLabel(getDWLabel("info_end", ModuleCU->getID()));
Asm->O << '\n';
}
Asm->OutStreamer.SwitchSection(
Asm->getObjFileLowering().getDwarfAbbrevSection());
- EmitLabel("abbrev_begin", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("abbrev_begin"));
// For each abbrevation.
for (unsigned i = 0, N = Abbreviations.size(); i < N; ++i) {
// Mark end of abbreviations.
EmitULEB128(0, "EOM(3)");
- EmitLabel("abbrev_end", 0);
- Asm->O << '\n';
+ Asm->OutStreamer.EmitLabel(getTempLabel("abbrev_end"));
}
}
Asm->getObjFileLowering().getDwarfLineSection());
// Construct the section header.
- EmitDifference("line_end", 0, "line_begin", 0, true);
+ EmitDifference(getTempLabel("line_end"), getTempLabel("line_begin"), true);
EOL("Length of Source Line Info");
- EmitLabel("line_begin", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("line_begin"));
Asm->EmitInt16(dwarf::DWARF_VERSION); EOL("DWARF version number");
- EmitDifference("line_prolog_end", 0, "line_prolog_begin", 0, true);
+ EmitDifference(getTempLabel("line_prolog_end"),
+ getTempLabel("line_prolog_begin"), true);
EOL("Prolog Length");
- EmitLabel("line_prolog_begin", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("line_prolog_begin"));
Asm->EmitInt8(1); EOL("Minimum Instruction Length");
Asm->EmitInt8(1); EOL("Default is_stmt_start flag");
Asm->EmitInt8(0); EOL("End of files");
- EmitLabel("line_prolog_end", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("line_prolog_end"));
// A sequence for each text section.
unsigned SecSrcLinesSize = SectionSourceLines.size();
// put into it, emit an empty table.
emitEndOfLineMatrix(1);
- EmitLabel("line_end", 0);
- Asm->O << '\n';
+ Asm->OutStreamer.EmitLabel(getTempLabel("line_end"));
}
/// emitCommonDebugFrame - Emit common frame info into a debug frame section.
Asm->OutStreamer.SwitchSection(
Asm->getObjFileLowering().getDwarfFrameSection());
- EmitLabel("debug_frame_common", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("debug_frame_common"));
EmitDifference("debug_frame_common_end", 0,
"debug_frame_common_begin", 0, true);
EOL("Length of Common Information Entry");
- EmitLabel("debug_frame_common_begin", 0);
+ Asm->OutStreamer.EmitLabel(getTempLabel("debug_frame_common_begin"));
Asm->EmitInt32((int)dwarf::DW_CIE_ID);
EOL("CIE Identifier Tag");
Asm->EmitInt8(dwarf::DW_CIE_VERSION);
EmitFrameMoves(NULL, 0, Moves, false);
Asm->EmitAlignment(2, 0, 0, false);
- EmitLabel("debug_frame_common_end", 0);
- Asm->O << '\n';
+ Asm->OutStreamer.EmitLabel(getTempLabel("debug_frame_common_end"));
}
/// emitFunctionDebugFrame - Emit per function frame info into a debug frame
"debug_frame_begin", DebugFrameInfo.Number, true);
EOL("Length of Frame Information Entry");
- EmitLabel("debug_frame_begin", DebugFrameInfo.Number);
+ Asm->OutStreamer.EmitLabel(getDWLabel("debug_frame_begin",
+ DebugFrameInfo.Number));
EmitSectionOffset(getTempLabel("debug_frame_common"),
getTempLabel("section_debug_frame"), true, false);
false);
Asm->EmitAlignment(2, 0, 0, false);
- EmitLabel("debug_frame_end", DebugFrameInfo.Number);
+ Asm->OutStreamer.EmitLabel(getDWLabel("debug_frame_end",
+ DebugFrameInfo.Number));
Asm->O << '\n';
}
"pubnames_begin", ModuleCU->getID(), true);
EOL("Length of Public Names Info");
- EmitLabel("pubnames_begin", ModuleCU->getID());
+ Asm->OutStreamer.EmitLabel(getDWLabel("pubnames_begin", ModuleCU->getID()));
Asm->EmitInt16(dwarf::DWARF_VERSION); EOL("DWARF Version");
}
Asm->EmitInt32(0); EOL("End Mark");
- EmitLabel("pubnames_end", ModuleCU->getID());
- Asm->O << '\n';
+ Asm->OutStreamer.EmitLabel(getDWLabel("pubnames_end", ModuleCU->getID()));
}
void DwarfDebug::emitDebugPubTypes() {
"pubtypes_begin", ModuleCU->getID(), true);
EOL("Length of Public Types Info");
- EmitLabel("pubtypes_begin", ModuleCU->getID());
+ Asm->OutStreamer.EmitLabel(getDWLabel("pubtypes_begin", ModuleCU->getID()));
if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("DWARF Version");
Asm->EmitInt16(dwarf::DWARF_VERSION);
}
Asm->EmitInt32(0); EOL("End Mark");
- EmitLabel("pubtypes_end", ModuleCU->getID());
- Asm->O << '\n';
+ Asm->OutStreamer.EmitLabel(getDWLabel("pubtypes_end", ModuleCU->getID()));
}
/// emitDebugStr - Emit visible names into a debug str section.
for (unsigned StringID = 1, N = StringPool.size();
StringID <= N; ++StringID) {
// Emit a label for reference from debug information entries.
- EmitLabel("string", StringID);
+ Asm->OutStreamer.EmitLabel(getDWLabel("string", StringID));
// Emit the string itself.
const std::string &String = StringPool[StringID];
"debug_inlined_begin", 1, true);
EOL("Length of Debug Inlined Information Entry");
- EmitLabel("debug_inlined_begin", 1);
+ Asm->OutStreamer.EmitLabel(getDWLabel("debug_inlined_begin", 1));
Asm->EmitInt16(dwarf::DWARF_VERSION); EOL("Dwarf Version");
Asm->EmitInt8(TD->getPointerSize()); EOL("Address Size (in bytes)");
}
}
- EmitLabel("debug_inlined_end", 1);
- Asm->O << '\n';
+ Asm->OutStreamer.EmitLabel(getDWLabel("debug_inlined_end", 1));
}
O << MAI->getPrivateGlobalPrefix();
O << "EH_frame" << Index << ":\n";
- EmitLabel("section_eh_frame", Index);
+ Asm->OutStreamer.EmitLabel(getDWLabel("section_eh_frame", Index));
// Define base labels.
- EmitLabel("eh_frame_common", Index);
+ Asm->OutStreamer.EmitLabel(getDWLabel("eh_frame_common", Index));
// Define the eh frame length.
EmitDifference("eh_frame_common_end", Index,
EOL("Length of Common Information Entry");
// EH frame header.
- EmitLabel("eh_frame_common_begin", Index);
+ Asm->OutStreamer.EmitLabel(getDWLabel("eh_frame_common_begin", Index));
if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("CIE Identifier Tag");
Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("DW_CIE_VERSION");
// be 8-byte on 64-bit targets to match what gcc does. Otherwise you get
// holes which confuse readers of eh_frame.
Asm->EmitAlignment(TD->getPointerSize() == 4 ? 2 : 3, 0, 0, false);
- EmitLabel("eh_frame_common_end", Index);
- Asm->O << '\n';
+ Asm->OutStreamer.EmitLabel(getDWLabel("eh_frame_common_end", Index));
}
/// EmitFDE - Emit the Frame Description Entry (FDE) for the function.
true);
EOL("Length of Frame Information Entry");
- EmitLabel("eh_frame_begin", EHFrameInfo.Number);
+ Asm->OutStreamer.EmitLabel(getDWLabel("eh_frame_begin",EHFrameInfo.Number));
EmitSectionOffset(getDWLabel("eh_frame_begin", EHFrameInfo.Number),
getDWLabel("eh_frame_common",
// get holes which confuse readers of eh_frame.
Asm->EmitAlignment(TD->getPointerSize() == sizeof(int32_t) ? 2 : 3,
0, 0, false);
- EmitLabel("eh_frame_end", EHFrameInfo.Number);
+ Asm->OutStreamer.EmitLabel(getDWLabel("eh_frame_end", EHFrameInfo.Number));
// If the function is marked used, this table should be also. We cannot
// make the mark unconditional in this case, since retaining the table also
// Emit the LSDA.
O << "GCC_except_table" << SubprogramCount << ":\n";
- EmitLabel("exception", SubprogramCount);
+ Asm->OutStreamer.EmitLabel(getDWLabel("exception", SubprogramCount));
if (IsSJLJ) {
SmallString<16> LSDAName;
if (shouldEmitMoves || shouldEmitTable)
// Assumes in correct section after the entry point.
- EmitLabel("eh_func_begin", ++SubprogramCount);
+ Asm->OutStreamer.EmitLabel(getDWLabel("eh_func_begin", ++SubprogramCount));
shouldEmitTableModule |= shouldEmitTable;
shouldEmitMovesModule |= shouldEmitMoves;
if (TimePassesIsEnabled)
ExceptionTimer->startTimer();
- EmitLabel("eh_func_end", SubprogramCount);
+ Asm->OutStreamer.EmitLabel(getDWLabel("eh_func_end", SubprogramCount));
EmitExceptionTable();
MCSymbol *FunctionEHSym =