summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-04-04 23:13:11 +0000
committerManman Ren <mren@apple.com>2013-04-04 23:13:11 +0000
commitbdcb4464e2bc50cc24fd5d81018c1f7ab4695f1b (patch)
tree84ea1756da08f81d13d2580b05142720224a4ab4 /llvm/lib/CodeGen
parent2de3daa0a288936154215d96fa106d5728b78164 (diff)
downloadbcm5719-llvm-bdcb4464e2bc50cc24fd5d81018c1f7ab4695f1b.tar.gz
bcm5719-llvm-bdcb4464e2bc50cc24fd5d81018c1f7ab4695f1b.zip
Debug Info: revert 178722 for now.
There is a difference for FORM_ref_addr between DWARF 2 and DWARF 3+. Since Eric is against guarding DWARF 2 ref_addr with DarwinGDBCompat, we are still in discussion on how to handle this. The correct solution is to update our header to say version 4 instead of version 2 and update tool chains as well. rdar://problem/13559431 llvm-svn: 178806
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp6
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.h4
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp9
3 files changed, 4 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index 326fbe55672..57e0acda890 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -310,12 +310,6 @@ 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);
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.h b/llvm/lib/CodeGen/AsmPrinter/DIE.h
index 8d68fd595fa..c332aa2a7db 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.h
@@ -336,7 +336,9 @@ namespace llvm {
/// SizeOf - Determine size of debug information entry in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const;
+ virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const {
+ return sizeof(int32_t);
+ }
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *E) { return E->getType() == isEntry; }
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index b6b0bb1237c..d3cb4f9c1c0 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1791,14 +1791,7 @@ void DwarfDebug::emitDIE(DIE *Die, std::vector<DIEAbbrev *> *Abbrevs) {
DwarfUnits &Holder = useSplitDwarf() ? SkeletonHolder : InfoHolder;
Addr += Holder.getCUOffset(Origin->getCompileUnit());
}
- // DWARF4: References that use the attribute form DW_FORM_ref_addr are
- // specified to be four bytes in the DWARF 32-bit format and eight bytes
- // in the DWARF 64-bit format, while DWARF Version 2 specifies that such
- // references have the same size as an address on the target system.
- // Our current version is version 2.
- Asm->OutStreamer.EmitIntValue(Addr,
- Form == dwarf::DW_FORM_ref_addr ?
- Asm->getDataLayout().getPointerSize() : 4);
+ Asm->EmitInt32(Addr);
break;
}
case dwarf::DW_AT_ranges: {
OpenPOWER on IntegriCloud