1 ; RUN: true 2 ; This file belongs to type-unique-simple2-a.ll. 3 ; 4 ; $ cat b.cpp 5 ; #include "ab.h" 6 ; void A::setFoo() {} 7 ; const 8 ; foo_t A::getFoo() { return 1; } 9 ; ModuleID = 'b.cpp' 10 ; target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 11 ; target triple = "x86_64-apple-macosx10.9.0" 12 13 %class.A = type { i32 (...)** } 14 15 @_ZTV1A = unnamed_addr constant [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%class.A*)* @_ZN1A6setFooEv to i8*), i8* bitcast (i32 (%class.A*)* @_ZN1A6getFooEv to i8*)] 16 @_ZTVN10__cxxabiv117__class_type_infoE = external global i8* 17 @_ZTS1A = constant [3 x i8] c"1A\00" 18 @_ZTI1A = unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8]* @_ZTS1A, i32 0, i32 0) } 19 20 ; Function Attrs: nounwind 21 define void @_ZN1A6setFooEv(%class.A* %this) unnamed_addr #0 align 2 { 22 entry: 23 %this.addr = alloca %class.A*, align 8 24 store %class.A* %this, %class.A** %this.addr, align 8 25 call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !32), !dbg !34 26 %this1 = load %class.A** %this.addr 27 ret void, !dbg !35 28 } 29 30 ; Function Attrs: nounwind readnone 31 declare void @llvm.dbg.declare(metadata, metadata) #1 32 33 ; Function Attrs: nounwind 34 define i32 @_ZN1A6getFooEv(%class.A* %this) unnamed_addr #0 align 2 { 35 entry: 36 %this.addr = alloca %class.A*, align 8 37 store %class.A* %this, %class.A** %this.addr, align 8 38 call void @llvm.dbg.declare(metadata !{%class.A** %this.addr}, metadata !36), !dbg !37 39 %this1 = load %class.A** %this.addr 40 ret i32 1, !dbg !38 41 } 42 43 attributes #0 = { nounwind } 44 attributes #1 = { nounwind readnone } 45 46 !llvm.dbg.cu = !{!0} 47 !llvm.module.flags = !{!29, !30} 48 !llvm.ident = !{!31} 49 50 !0 = metadata !{i32 786449, metadata !1, i32 4, metadata !"clang version 3.5 ", i1 false, metadata !"", i32 0, metadata !2, metadata !3, metadata !25, metadata !2, metadata !2, metadata !""} ; [ DW_TAG_compile_unit ] [/<unknown>] [DW_LANG_C_plus_plus] 51 !1 = metadata !{metadata !"<unknown>", metadata !""} 52 !2 = metadata !{} 53 !3 = metadata !{metadata !4} 54 !4 = metadata !{i32 786434, metadata !5, null, metadata !"A", i32 2, i64 64, i64 64, i32 0, i32 0, null, metadata !6, i32 0, metadata !"_ZTS1A", null, metadata !"_ZTS1A"} ; [ DW_TAG_class_type ] [A] [line 2, size 64, align 64, offset 0] [def] [from ] 55 !5 = metadata !{metadata !"./ab.h", metadata !""} 56 !6 = metadata !{metadata !7, metadata !14, metadata !19} 57 !7 = metadata !{i32 786445, metadata !5, metadata !8, metadata !"_vptr$A", i32 0, i64 64, i64 0, i64 0, i32 64, metadata !9} ; [ DW_TAG_member ] [_vptr$A] [line 0, size 64, align 0, offset 0] [artificial] [from ] 58 !8 = metadata !{i32 786473, metadata !5} ; [ DW_TAG_file_type ] [/./ab.h] 59 !9 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 0, i64 0, i32 0, metadata !10} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 0, offset 0] [from __vtbl_ptr_type] 60 !10 = metadata !{i32 786447, null, null, metadata !"__vtbl_ptr_type", i32 0, i64 64, i64 0, i64 0, i32 0, metadata !11} ; [ DW_TAG_pointer_type ] [__vtbl_ptr_type] [line 0, size 64, align 0, offset 0] [from ] 61 !11 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !12, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] 62 !12 = metadata !{metadata !13} 63 !13 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] 64 !14 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"setFoo", metadata !"setFoo", metadata !"_ZN1A6setFooEv", i32 4, metadata !15, i1 false, i1 false, i32 1, i32 0, metadata !"_ZTS1A", i32 256, i1 false, null, null, i32 0, metadata !18, i32 4} ; [ DW_TAG_subprogram ] [line 4] [setFoo] 65 !15 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] 66 !16 = metadata !{null, metadata !17} 67 !17 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 1088, metadata !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [artificial] [from _ZTS1A] 68 !18 = metadata !{i32 786468} 69 !19 = metadata !{i32 786478, metadata !5, metadata !"_ZTS1A", metadata !"getFoo", metadata !"getFoo", metadata !"_ZN1A6getFooEv", i32 5, metadata !20, i1 false, i1 false, i32 1, i32 1, metadata !"_ZTS1A", i32 256, i1 false, null, null, i32 0, metadata !24, i32 5} ; [ DW_TAG_subprogram ] [line 5] [getFoo] 70 !20 = metadata !{i32 786453, i32 0, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !21, i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] 71 !21 = metadata !{metadata !22, metadata !17} 72 !22 = metadata !{i32 786470, null, null, metadata !"", i32 0, i64 0, i64 0, i64 0, i32 0, metadata !23} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from foo_t] 73 !23 = metadata !{i32 786454, metadata !5, null, metadata !"foo_t", i32 1, i64 0, i64 0, i64 0, i32 0, metadata !13} ; [ DW_TAG_typedef ] [foo_t] [line 1, size 0, align 0, offset 0] [from int] 74 !24 = metadata !{i32 786468} 75 !25 = metadata !{metadata !26, metadata !28} 76 !26 = metadata !{i32 786478, metadata !27, metadata !"_ZTS1A", metadata !"setFoo", metadata !"setFoo", metadata !"_ZN1A6setFooEv", i32 2, metadata !15, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, void (%class.A*)* @_ZN1A6setFooEv, null, metadata !14, metadata !2, i32 2} ; [ DW_TAG_subprogram ] [line 2] [def] [setFoo] 77 !27 = metadata !{metadata !"b.cpp", metadata !""} 78 !28 = metadata !{i32 786478, metadata !27, metadata !"_ZTS1A", metadata !"getFoo", metadata !"getFoo", metadata !"_ZN1A6getFooEv", i32 4, metadata !20, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 (%class.A*)* @_ZN1A6getFooEv, null, metadata !19, metadata !2, i32 4} ; [ DW_TAG_subprogram ] [line 4] [def] [getFoo] 79 !29 = metadata !{i32 2, metadata !"Dwarf Version", i32 2} 80 !30 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} 81 !31 = metadata !{metadata !"clang version 3.5 "} 82 !32 = metadata !{i32 786689, metadata !26, metadata !"this", null, i32 16777216, metadata !33, i32 1088, i32 0} ; [ DW_TAG_arg_variable ] [this] [line 0] 83 !33 = metadata !{i32 786447, null, null, metadata !"", i32 0, i64 64, i64 64, i64 0, i32 0, metadata !"_ZTS1A"} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from _ZTS1A] 84 !34 = metadata !{i32 0, i32 0, metadata !26, null} 85 !35 = metadata !{i32 2, i32 0, metadata !26, null} 86 !36 = metadata !{i32 786689, metadata !28, metadata !"this", null, i32 16777216, metadata !33, i32 1088, i32 0} ; [ DW_TAG_arg_variable ] [this] [line 0] 87 !37 = metadata !{i32 0, i32 0, metadata !28, null} 88 !38 = metadata !{i32 4, i32 0, metadata !28, null} 89