forked from OSchip/llvm-project
Only emit DW_AT_object_pointer if this is a definition.
llvm-svn: 164326
This commit is contained in:
parent
93ab64916f
commit
3a3d529e0d
|
@ -1109,9 +1109,6 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) {
|
||||||
addType(Arg, ATy);
|
addType(Arg, ATy);
|
||||||
if (ATy.isArtificial())
|
if (ATy.isArtificial())
|
||||||
addFlag(Arg, dwarf::DW_AT_artificial);
|
addFlag(Arg, dwarf::DW_AT_artificial);
|
||||||
if (ATy.isObjectPointer())
|
|
||||||
addDIEEntry(SPDie, dwarf::DW_AT_object_pointer, dwarf::DW_FORM_ref4,
|
|
||||||
Arg);
|
|
||||||
SPDie->addChild(Arg);
|
SPDie->addChild(Arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
|
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
|
||||||
; RUN: llvm-dwarfdump %t | FileCheck %s
|
; RUN: llvm-dwarfdump %t | FileCheck %s
|
||||||
|
|
||||||
; CHECK: DW_AT_object_pointer [DW_FORM_ref4] (cu + 0x00c3 => {0x000000c3})
|
; CHECK: DW_AT_object_pointer [DW_FORM_ref4] (cu + 0x00bf => {0x000000bf})
|
||||||
; CHECK: 0x000000c3: DW_TAG_formal_parameter [12]
|
; CHECK: 0x000000bf: DW_TAG_formal_parameter [12]
|
||||||
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000085] = "this")
|
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000085] = "this")
|
||||||
|
|
||||||
%class.A = type { i32 }
|
%class.A = type { i32 }
|
||||||
|
|
Loading…
Reference in New Issue