summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a268ba8)
raw | patch | inline | side by side (parent: a268ba8)
author | Eric Christopher <echristo@gmail.com> | |
Fri, 24 Jan 2014 11:52:53 +0000 (11:52 +0000) | ||
committer | Eric Christopher <echristo@gmail.com> | |
Fri, 24 Jan 2014 11:52:53 +0000 (11:52 +0000) |
in order to fix the cygwin/mingw bots.
This reverts commit r199990.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199991 91177308-0d34-0410-b5e6-96231b3b80d8
This reverts commit r199990.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199991 91177308-0d34-0410-b5e6-96231b3b80d8
index 077af8c375619758e74b7450e5ed7e34e8295a76..7ba4fece43bc22a0881860c6931ca565e6d14646 100644 (file)
DwarfAddrSectionSym = 0;
DwarfAbbrevDWOSectionSym = DwarfStrDWOSectionSym = 0;
FunctionBeginSym = FunctionEndSym = 0;
- TextSectionBeginSym = TextSectionEndSym = 0;
CurFn = 0;
CurMI = 0;
addSectionLabel(Asm, U, U->getUnitDie(), dwarf::DW_AT_ranges,
Asm->GetTempSymbol("cu_ranges", U->getUniqueID()),
DwarfDebugRangeSectionSym);
- else {
- U->addLocalLabelAddress(U->getUnitDie(), dwarf::DW_AT_low_pc,
- TextSectionBeginSym);
- U->addLocalLabelAddress(U->getUnitDie(), dwarf::DW_AT_high_pc,
- TextSectionEndSym);
- }
+ else
+ U->addUInt(U->getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr,
+ 0);
}
}
Sym = Asm->GetTempSymbol("debug_end", ID);
Asm->OutStreamer.SwitchSection(Section);
Asm->OutStreamer.EmitLabel(Sym);
- // If this is the end of the text section keep track of where the end of
- // the section is so that we can use it later.
- if (Section == Asm->getObjFileLowering().getTextSection())
- TextSectionEndSym = Sym;
}
// Insert a final terminator.
DwarfDebugLocSectionSym =
emitSectionSym(Asm, TLOF.getDwarfLocSection(), "section_debug_loc");
-
- TextSectionBeginSym = emitSectionSym(Asm, TLOF.getTextSection(), "text_begin");
}
// Recursively emits a debug information entry.
index 1071e5892ac428e5c4194f69b2bf4b6fd51ab89c..516def804d1533f577900bbc1ce55479d8ec5930 100644 (file)
MCSymbol *DwarfInfoDWOSectionSym, *DwarfAbbrevDWOSectionSym;
MCSymbol *DwarfStrDWOSectionSym;
MCSymbol *DwarfGnuPubNamesSectionSym, *DwarfGnuPubTypesSectionSym;
- MCSymbol *TextSectionBeginSym, *TextSectionEndSym;
// As an optimization, there is no need to emit an entry in the directory
// table for the same directory as DW_AT_comp_dir.
index e9b10ba2911024196f6d9f9f5380bb51d16bed72..4f55d89ce2c959ac2b34988354d1c360a2f0409d 100644 (file)
///
void DwarfCompileUnit::addLabelAddress(DIE *Die, dwarf::Attribute Attribute,
MCSymbol *Label) {
- if (!DD->useSplitDwarf())
- return addLocalLabelAddress(Die, Attribute, Label);
-
- if (Label)
- DD->addArangeLabel(SymbolCU(this, Label));
-
- unsigned idx = DU->getAddrPoolIndex(Label);
- DIEValue *Value = new (DIEValueAllocator) DIEInteger(idx);
- Die->addValue(Attribute, dwarf::DW_FORM_GNU_addr_index, Value);
-}
-
-/// addLocalLabelAddress - Add a dwarf label attribute data and value using
-/// DW_FORM_addr only.
-///
-void DwarfCompileUnit::addLocalLabelAddress(DIE *Die,
- dwarf::Attribute Attribute,
- MCSymbol *Label) {
if (Label)
DD->addArangeLabel(SymbolCU(this, Label));
- if (Label) {
- DIEValue *Value = new (DIEValueAllocator) DIELabel(Label);
- Die->addValue(Attribute, dwarf::DW_FORM_addr, Value);
+ if (!DD->useSplitDwarf()) {
+ if (Label) {
+ DIEValue *Value = new (DIEValueAllocator) DIELabel(Label);
+ Die->addValue(Attribute, dwarf::DW_FORM_addr, Value);
+ } else {
+ DIEValue *Value = new (DIEValueAllocator) DIEInteger(0);
+ Die->addValue(Attribute, dwarf::DW_FORM_addr, Value);
+ }
} else {
- DIEValue *Value = new (DIEValueAllocator) DIEInteger(0);
- Die->addValue(Attribute, dwarf::DW_FORM_addr, Value);
+ unsigned idx = DU->getAddrPoolIndex(Label);
+ DIEValue *Value = new (DIEValueAllocator) DIEInteger(idx);
+ Die->addValue(Attribute, dwarf::DW_FORM_GNU_addr_index, Value);
}
}
index 684c46b624e2e0ef9fe782815c05fbc11a72fc6c..3f42e2f672813cfb5857a5ce31c529016dad00fa 100644 (file)
/// addLabelAddress - Add a dwarf label attribute data and value using
/// either DW_FORM_addr or DW_FORM_GNU_addr_index.
void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label);
-
- /// addLocalLabelAddress - Add a dwarf label attribute data and value using
- /// DW_FORM_addr only.
- void addLocalLabelAddress(DIE *Die, dwarf::Attribute Attribute,
- MCSymbol *Label);
};
class DwarfTypeUnit : public DwarfUnit {
diff --git a/test/DebugInfo/X86/concrete_out_of_line.ll b/test/DebugInfo/X86/concrete_out_of_line.ll
index ce82c7a6c7f860c04a799d10f6725ae190434f34..4a152963a1444124e793d62f1766e2a5e9378405 100644 (file)
; first check that we have a TAG_subprogram at a given offset and it has
; AT_inline.
-; CHECK: 0x00000124: DW_TAG_subprogram [17]
+; CHECK: 0x0000011c: DW_TAG_subprogram [17]
; CHECK-NEXT: DW_AT_specification
; CHECK-NEXT: DW_AT_inline
; and then that a TAG_subprogram refers to it with AT_abstract_origin.
-; CHECK: 0x00000165: DW_TAG_subprogram [19]
-; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x0124 => {0x00000124})
+; CHECK: 0x0000015d: DW_TAG_subprogram [19]
+; CHECK-NEXT: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x011c => {0x0000011c})
define i32 @_ZN17nsAutoRefCnt7ReleaseEv() {
entry:
index ccdbb6e9186606756661241e62f1e516939e2ab7..1af7f97b317336db89de4824f5332e914c702f10 100644 (file)
; OBJ-NEXT: R_X86_64_32 .debug_str
; OBJ-NEXT: R_X86_64_32 .debug_addr
; OBJ-NEXT: R_X86_64_32 .debug_str
-; OBJ-NEXT: R_X86_64_64 .text 0x0
-; OBJ-NEXT: R_X86_64_64 .text 0x0
; OBJ-NEXT: }
; OBJ: .debug_aranges
; OBJ-NEXT: R_X86_64_32 .debug_info 0x0