summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-04-04 00:22:54 +0000
committerManman Ren <mren@apple.com>2013-04-04 00:22:54 +0000
commit5a15c9ed9f24fcba104e7d8e834cf890d973daaa (patch)
treecd5142e74c95948846b89e70f3db46a8bb199ebb /llvm/lib/CodeGen/AsmPrinter/DIE.cpp
parent770a4c1a37010722c60d8fb9eae94be3b7873ddf (diff)
downloadbcm5719-llvm-5a15c9ed9f24fcba104e7d8e834cf890d973daaa.tar.gz
bcm5719-llvm-5a15c9ed9f24fcba104e7d8e834cf890d973daaa.zip
Debug Info: according to DWARF 2, FORM_ref_addr the same size as an address on
the target system. It was hard-coded to 4 bytes before. I can't get llvm to generate a ref_addr on a reasonably sized testing case. rdar://problem/13559431 llvm-svn: 178722
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index 57e0acda890..326fbe55672 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -310,6 +310,12 @@ void DIEEntry::EmitValue(AsmPrinter *AP, unsigned Form) const {
AP->EmitInt32(Entry->getOffset());
}
+unsigned DIEEntry::SizeOf(AsmPrinter *AP, unsigned Form) const {
+ if (Form == dwarf::DW_FORM_ref_addr)
+ return AP->getDataLayout().getPointerSize();
+ return sizeof(int32_t);
+}
+
#ifndef NDEBUG
void DIEEntry::print(raw_ostream &O) {
O << format("Die: 0x%lx", (long)(intptr_t)Entry);
OpenPOWER on IntegriCloud