summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-12-30 03:02:12 +0000
committerEric Christopher <echristo@gmail.com>2013-12-30 03:02:12 +0000
commit83fff3fce7743bc84f102dc32680cbd38458e3b8 (patch)
treef2b838c119e2165fed115f968ba06059cdf586c0 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parent94b0f0278e49809e341c9d57b605d54e45b1de9c (diff)
downloadbcm5719-llvm-83fff3fce7743bc84f102dc32680cbd38458e3b8.tar.gz
bcm5719-llvm-83fff3fce7743bc84f102dc32680cbd38458e3b8.zip
Use a pointer to keep track of the skeleton unit for each normal unit
and construct it up front. Add address ranges at the end and a helper routine so that we're not needlessly using an indirction in the case of split dwarf. Update testcases according to the new ordering of attributes on the compile unit. llvm-svn: 198196
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 693e37ffe8d..7e46d3c97d1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -293,6 +293,23 @@ void DwarfCompileUnit::addLabelAddress(DIE *Die, dwarf::Attribute Attribute,
}
}
+/// addLocalLabelAddress - Add a dwarf label attribute data and value using
+/// DW_FORM_addr.
+void DwarfCompileUnit::addLocalLabelAddress(DIE *Die,
+ dwarf::Attribute Attribute,
+ MCSymbol *Label) {
+ if (Label)
+ DD->addArangeLabel(SymbolCU(this, Label));
+
+ if (Label != NULL) {
+ 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);
+ }
+}
+
/// addOpAddress - Add a dwarf op address data and value using the
/// form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index.
///
OpenPOWER on IntegriCloud