llvm.org GIT mirror llvm / 727df2c
Add another test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137969 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 8 years ago
2 changed file(s) with 70 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-link %s %p/2011-08-18-unique-class-type2.ll -S -o - | grep DW_TAG_class_type | count 1
1 ; Test to check there is only one MDNode for class A after linking.
2
3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
4 target triple = "x86_64-apple-macosx10.7.0"
5
6 %"class.N1::A" = type { i8 }
7
8 define void @_Z3fooN2N11AE() nounwind uwtable ssp {
9 entry:
10 %mya = alloca %"class.N1::A", align 1
11 call void @llvm.dbg.declare(metadata !{%"class.N1::A"* %mya}, metadata !9), !dbg !13
12 ret void, !dbg !14
13 }
14
15 declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
16
17 !llvm.dbg.cu = !{!0}
18
19 !0 = metadata !{i32 720913, i32 0, i32 4, metadata !"n1.c", metadata !"/private/tmp", metadata !"clang version 3.0 (trunk 137954)", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} ; [ DW_TAG_compile_unit ]
20 !1 = metadata !{metadata !2}
21 !2 = metadata !{i32 0}
22 !3 = metadata !{metadata !4}
23 !4 = metadata !{metadata !5}
24 !5 = metadata !{i32 720942, i32 0, metadata !6, metadata !"foo", metadata !"foo", metadata !"_Z3fooN2N11AE", metadata !6, i32 4, metadata !7, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void ()* @_Z3fooN2N11AE, null, null} ; [ DW_TAG_subprogram ]
25 !6 = metadata !{i32 720937, metadata !"n1.c", metadata !"/private/tmp", null} ; [ DW_TAG_file_type ]
26 !7 = metadata !{i32 720917, metadata !6, metadata !"", metadata !6, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
27 !8 = metadata !{null}
28 !9 = metadata !{i32 721153, metadata !5, metadata !"mya", metadata !6, i32 16777220, metadata !10, i32 0, i32 0} ; [ DW_TAG_arg_variable ]
29 !10 = metadata !{i32 720898, metadata !11, metadata !"A", metadata !12, i32 3, i64 8, i64 8, i32 0, i32 0, null, metadata !2, i32 0, null, null} ; [ DW_TAG_class_type ]
30 !11 = metadata !{i32 720953, null, metadata !"N1", metadata !12, i32 2} ; [ DW_TAG_namespace ]
31 !12 = metadata !{i32 720937, metadata !"./n.h", metadata !"/private/tmp", null} ; [ DW_TAG_file_type ]
32 !13 = metadata !{i32 4, i32 12, metadata !5, null}
33 !14 = metadata !{i32 4, i32 18, metadata !15, null}
34 !15 = metadata !{i32 720907, metadata !5, i32 4, i32 17, metadata !6, i32 0} ; [ DW_TAG_lexical_block ]
0 ; This file is for use with 2011-08-10-unique-class-type.ll
1 ; RUN: true
2
3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
4 target triple = "x86_64-apple-macosx10.7.0"
5
6 %"class.N1::A" = type { i8 }
7
8 define void @_Z3barN2N11AE() nounwind uwtable ssp {
9 entry:
10 %youra = alloca %"class.N1::A", align 1
11 call void @llvm.dbg.declare(metadata !{%"class.N1::A"* %youra}, metadata !9), !dbg !13
12 ret void, !dbg !14
13 }
14
15 declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
16
17 !llvm.dbg.cu = !{!0}
18
19 !0 = metadata !{i32 720913, i32 0, i32 4, metadata !"n2.c", metadata !"/private/tmp", metadata !"clang version 3.0 (trunk 137954)", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} ; [ DW_TAG_compile_unit ]
20 !1 = metadata !{metadata !2}
21 !2 = metadata !{i32 0}
22 !3 = metadata !{metadata !4}
23 !4 = metadata !{metadata !5}
24 !5 = metadata !{i32 720942, i32 0, metadata !6, metadata !"bar", metadata !"bar", metadata !"_Z3barN2N11AE", metadata !6, i32 4, metadata !7, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, void ()* @_Z3barN2N11AE, null, null} ; [ DW_TAG_subprogram ]
25 !6 = metadata !{i32 720937, metadata !"n2.c", metadata !"/private/tmp", null} ; [ DW_TAG_file_type ]
26 !7 = metadata !{i32 720917, metadata !6, metadata !"", metadata !6, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
27 !8 = metadata !{null}
28 !9 = metadata !{i32 721153, metadata !5, metadata !"youra", metadata !6, i32 16777220, metadata !10, i32 0, i32 0} ; [ DW_TAG_arg_variable ]
29 !10 = metadata !{i32 720898, metadata !11, metadata !"A", metadata !12, i32 3, i64 8, i64 8, i32 0, i32 0, null, metadata !2, i32 0, null, null} ; [ DW_TAG_class_type ]
30 !11 = metadata !{i32 720953, null, metadata !"N1", metadata !12, i32 2} ; [ DW_TAG_namespace ]
31 !12 = metadata !{i32 720937, metadata !"./n.h", metadata !"/private/tmp", null} ; [ DW_TAG_file_type ]
32 !13 = metadata !{i32 4, i32 12, metadata !5, null}
33 !14 = metadata !{i32 4, i32 20, metadata !15, null}
34 !15 = metadata !{i32 720907, metadata !5, i32 4, i32 19, metadata !6, i32 0} ; [ DW_TAG_lexical_block ]