summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2bb4f4)
raw | patch | inline | side by side (parent: e2bb4f4)
author | David Blaikie <dblaikie@gmail.com> | |
Fri, 7 Mar 2014 01:30:55 +0000 (01:30 +0000) | ||
committer | David Blaikie <dblaikie@gmail.com> | |
Fri, 7 Mar 2014 01:30:55 +0000 (01:30 +0000) |
This removes a relocation from each subprogram, reducing link times,
etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203187 91177308-0d34-0410-b5e6-96231b3b80d8
etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203187 91177308-0d34-0410-b5e6-96231b3b80d8
index d30be28236127cd930e902bbbee03fcee6da641e..7abd2f1dc73018e69047220a80e03c7fdc63e9cb 100644 (file)
}
SPCU->addLabelAddress(SPDie, dwarf::DW_AT_low_pc, FunctionBeginSym);
- SPCU->addLabelAddress(SPDie, dwarf::DW_AT_high_pc, FunctionEndSym);
+ SPCU->addLabelDelta(SPDie, dwarf::DW_AT_high_pc, FunctionEndSym,
+ FunctionBeginSym);
const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
MachineLocation Location(RI->getFrameRegister(*Asm->MF));
index ddc1c2f4bc0d0b68531bcc43a69834517d58be83..e046bf417b61800af9ee045ac6100649e6848aad 100644 (file)
Die->addValue(Attribute, dwarf::DW_FORM_data4, Value);
}
+void DwarfUnit::addLabelDelta(DIE *Die, dwarf::Attribute Attribute,
+ const MCSymbol *Hi, const MCSymbol *Lo) {
+ DIEValue *Value = new (DIEValueAllocator) DIEDelta(Hi, Lo);
+ Die->addValue(Attribute, dwarf::DW_FORM_data4, Value);
+}
+
/// addDIEEntry - Add a DIE attribute data and value.
///
void DwarfUnit::addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIE *Entry) {
index 937a607fa88ef31d667b03dde9daee8178307c1f..af465c006ed485306270c4910e4eb2510f873c3c 100644 (file)
void addSectionDelta(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
const MCSymbol *Lo);
+ /// addLabelDelta - Add a label delta attribute data and value.
+ void addLabelDelta(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
+ const MCSymbol *Lo);
+
/// addDIEEntry - Add a DIE attribute data and value.
void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIE *Entry);
index 3325f30293a7c3ec9f31e612d39771fa2a47b0e0..b30bd33ea3a2f7b761b5b9a0ec4c67f5aa2c088a 100644 (file)
; A couple of ABS64s similarly:
; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
-; CHECK: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000008)
+; CHECK: DW_AT_high_pc [DW_FORM_data4] (0x00000008)
define i32 @main() nounwind {
ret i32 0, !dbg !8
index 1e21c6a00ae4aae0f4034468e6f63e27a54fb009..83907b1cb13e568eeb72f9c6882ec776e25d01b9 100644 (file)
target triple = "x86_64-apple-darwin10.0.0"
;Radar 8950491
-;CHECK: .long Lset5
+;CHECK: .long Lset6
;CHECK-NEXT: ## DW_AT_decl_file
;CHECK-NEXT: ## DW_AT_decl_line
;CHECK-NEXT: ## DW_AT_type