/// DwarfSectionOffsetDirective - Special section offset directive.
const char* DwarfSectionOffsetDirective; // Defaults to NULL
+ /// DwarfUsesAbsoluteLabelForStmtList - True if DW_AT_stmt_list needs
+ /// absolute label instead of offset.
+ bool DwarfUsesAbsoluteLabelForStmtList; // Defaults to true;
+
//===--- CBE Asm Translation Table -----------------------------------===//
const char *const *AsmTransCBE; // Defaults to empty
const char *getDwarfSectionOffsetDirective() const {
return DwarfSectionOffsetDirective;
}
+ bool doesDwarfUsesAbsoluteLabelForStmtList() const {
+ return DwarfUsesAbsoluteLabelForStmtList;
+ }
const char *const *getAsmCBE() const {
return AsmTransCBE;
}
addUInt(Die, dwarf::DW_AT_entry_pc, dwarf::DW_FORM_addr, 0);
// DW_AT_stmt_list is a offset of line number information for this
// compile unit in debug_line section.
- addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
+ if (Asm->MAI->doesDwarfUsesAbsoluteLabelForStmtList())
+ addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_addr,
+ Asm->GetTempSymbol("section_line"));
+ else
+ addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
if (!Dir.empty())
addString(Die, dwarf::DW_AT_comp_dir, dwarf::DW_FORM_string, Dir);
ExceptionsType = ExceptionHandling::None;
DwarfRequiresFrameSection = true;
DwarfUsesInlineInfoSection = false;
+ DwarfUsesAbsoluteLabelForStmtList = true;
DwarfSectionOffsetDirective = 0;
HasMicrosoftFastStdCallMangling = false;
HasDotTypeDotSizeDirective = false;
HasNoDeadStrip = true;
+
+ DwarfUsesAbsoluteLabelForStmtList = false;
}