summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-09-20 22:51:57 +0000
committerEric Christopher <echristo@apple.com>2012-09-20 22:51:57 +0000
commit3a3d529e0dd70d17361dbadad5d6c0d775446a3d (patch)
treedcaa215fed291d40dca975f50a175f4196955b12 /llvm
parent93ab64916f67fd826d5aa18afe1629de739b716b (diff)
downloadbcm5719-llvm-3a3d529e0dd70d17361dbadad5d6c0d775446a3d.tar.gz
bcm5719-llvm-3a3d529e0dd70d17361dbadad5d6c0d775446a3d.zip
Only emit DW_AT_object_pointer if this is a definition.
llvm-svn: 164326
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp3
-rw-r--r--llvm/test/DebugInfo/X86/DW_AT_object_pointer.ll4
2 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 58e65c06d4e..0007f13e918 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1109,9 +1109,6 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) {
addType(Arg, ATy);
if (ATy.isArtificial())
addFlag(Arg, dwarf::DW_AT_artificial);
- if (ATy.isObjectPointer())
- addDIEEntry(SPDie, dwarf::DW_AT_object_pointer, dwarf::DW_FORM_ref4,
- Arg);
SPDie->addChild(Arg);
}
}
diff --git a/llvm/test/DebugInfo/X86/DW_AT_object_pointer.ll b/llvm/test/DebugInfo/X86/DW_AT_object_pointer.ll
index 13889902f77..163a1e7cec7 100644
--- a/llvm/test/DebugInfo/X86/DW_AT_object_pointer.ll
+++ b/llvm/test/DebugInfo/X86/DW_AT_object_pointer.ll
@@ -1,8 +1,8 @@
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
; RUN: llvm-dwarfdump %t | FileCheck %s
-; CHECK: DW_AT_object_pointer [DW_FORM_ref4] (cu + 0x00c3 => {0x000000c3})
-; CHECK: 0x000000c3: DW_TAG_formal_parameter [12]
+; CHECK: DW_AT_object_pointer [DW_FORM_ref4] (cu + 0x00bf => {0x000000bf})
+; CHECK: 0x000000bf: DW_TAG_formal_parameter [12]
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000085] = "this")
%class.A = type { i32 }
OpenPOWER on IntegriCloud