X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FDebugInfo%2FX86%2FDW_AT_object_pointer.ll;h=7885514c2c6453a173240d1f8b33ceff0dfefcca;hb=f345c4732c6e3edec4a51d4c31294c7fdbef4b2c;hp=5fa96994a8be76258b49f823708a93cbb02bfd7f;hpb=289978069fec6b617192283fc52c6f6731f82e30;p=oota-llvm.git diff --git a/test/DebugInfo/X86/DW_AT_object_pointer.ll b/test/DebugInfo/X86/DW_AT_object_pointer.ll index 5fa96994a8b..7885514c2c6 100644 --- a/test/DebugInfo/X86/DW_AT_object_pointer.ll +++ b/test/DebugInfo/X86/DW_AT_object_pointer.ll @@ -1,13 +1,28 @@ ; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s -; CHECK: DW_TAG_formal_parameter [ -; CHECK-NOT: "" +; Emit the DW_TAG_object_pointer on the declaration only, not the definition. +; This seems the most correct thing - the DW_TAG_object_pointer is inherited +; from the declaration to any (abstract or concrete) definitions and DWARF +; consumers can use this information for callers that can only see the +; declaration. +; That said, it isn't very space efficient - making member function +; declarations 11 bytes instead of 7 and I'm not sure which tools actually +; use this information here (ObjC Blocks are a different story & most likely +; require object_pointer) - perhaps we should omit it entirely for space. +; No overall space impact study has been performed. + +; CHECK: [[DEFINITION:0x[0-9a-f]*]]: DW_TAG_subprogram +; CHECK-NOT: DW_TAG +; CHECK-NOT: DW_TAG_object_pointer ; CHECK: DW_TAG + ; CHECK: DW_TAG_class_type +; CHECK-NOT: NULL +; CHECK: DW_TAG_subprogram +; CHECK-NEXT: DW_AT_name {{.*}} "A" ; CHECK: DW_AT_object_pointer [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[PARAM:0x[0-9a-f]*]]}) ; CHECK: [[PARAM]]: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "this") %class.A = type { i32 }