1; struct A {
2;   void foo();
3; };
4;
5; void (A::*p)() = &A::foo;
6;
7; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s
8; Check that the member function pointer is emitted without a DW_AT_size attribute.
9; CHECK: DW_TAG_ptr_to_member_type
10; CHECK-NOT: DW_AT_{{.*}}size
11; CHECK: DW_TAG
12;
13; ModuleID = 'memberfnptr.cpp'
14target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
15target triple = "x86_64-apple-macosx"
16
17%struct.A = type { i8 }
18
19@p = global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A3fooEv to i64), i64 0 }, align 8
20
21declare void @_ZN1A3fooEv(%struct.A*)
22
23!llvm.dbg.cu = !{!0}
24!llvm.module.flags = !{!14, !15, !16}
25!llvm.ident = !{!17}
26
27!0 = !{!"0x11\004\00clang version 3.6.0 \000\00\000\00\001", !1, !2, !3, !2, !10, !2} ; [ DW_TAG_compile_unit ] [/memberfnptr.cpp] [DW_LANG_C_plus_plus]
28!1 = !{!"memberfnptr.cpp", !""}
29!2 = !{}
30!3 = !{!4}
31!4 = !{!"0x13\00A\001\008\008\000\000\000", !1, null, null, !5, null, null, !"_ZTS1A"} ; [ DW_TAG_structure_type ] [A] [line 1, size 8, align 8, offset 0] [def] [from ]
32!5 = !{!6}
33!6 = !{!"0x2e\00foo\00foo\00_ZN1A3fooEv\002\000\000\000\000\00256\000\002", !1, !"_ZTS1A", !7, null, null, null, null, null} ; [ DW_TAG_subprogram ] [line 2] [foo]
34!7 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !8, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
35!8 = !{null, !9}
36!9 = !{!"0xf\00\000\0064\0064\000\001088\00", null, null, !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from _ZTS1A]
37!10 = !{!11}
38!11 = !{!"0x34\00p\00p\00\005\000\001", null, !12, !13, { i64, i64 }* @p, null} ; [ DW_TAG_variable ] [p] [line 5] [def]
39!12 = !{!"0x29", !1}                              ; [ DW_TAG_file_type ] [/memberfnptr.cpp]
40!13 = !{!"0x1f\00\000\0064\000\000\000", null, null, !7, !"_ZTS1A"} ; [ DW_TAG_ptr_to_member_type ] [line 0, size 64, align 0, offset 0] [from ]
41!14 = !{i32 2, !"Dwarf Version", i32 2}
42!15 = !{i32 2, !"Debug Info Version", i32 2}
43!16 = !{i32 1, !"PIC Level", i32 2}
44!17 = !{!"clang version 3.6.0 "}
45