86 lines · plain
1; RUN: true2; This file belongs to type-unique-simple2-a.ll.3;4; $ cat b.cpp5; #include "ab.h"6; void A::setFoo() {}7; const8; 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 { ptr }14 15@_ZTV1A = unnamed_addr constant [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN1A6setFooEv, ptr @_ZN1A6getFooEv]16@_ZTVN10__cxxabiv117__class_type_infoE = external global ptr17@_ZTS1A = constant [3 x i8] c"1A\00"18@_ZTI1A = unnamed_addr constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTS1A }19 20; Function Attrs: nounwind21define void @_ZN1A6setFooEv(ptr %this) unnamed_addr #0 align 2 !dbg !26 {22entry:23 %this.addr = alloca ptr, align 824 store ptr %this, ptr %this.addr, align 825 call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !32, metadata !DIExpression()), !dbg !3426 %this1 = load ptr, ptr %this.addr27 ret void, !dbg !3528}29 30; Function Attrs: nounwind readnone31declare void @llvm.dbg.declare(metadata, metadata, metadata) #132 33; Function Attrs: nounwind34define i32 @_ZN1A6getFooEv(ptr %this) unnamed_addr #0 align 2 !dbg !28 {35entry:36 %this.addr = alloca ptr, align 837 store ptr %this, ptr %this.addr, align 838 call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !36, metadata !DIExpression()), !dbg !3739 %this1 = load ptr, ptr %this.addr40 ret i32 1, !dbg !3841}42 43attributes #0 = { nounwind }44attributes #1 = { nounwind readnone }45 46!llvm.dbg.cu = !{!0}47!llvm.module.flags = !{!29, !30}48!llvm.ident = !{!31}49 50!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !2, imports: !2)51!1 = !DIFile(filename: "<unknown>", directory: "")52!2 = !{}53!3 = !{!4}54!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 2, size: 64, align: 64, file: !5, elements: !6, vtableHolder: !4, identifier: "_ZTS1A")55!5 = !DIFile(filename: "./ab.h", directory: "")56!6 = !{!7, !14, !19}57!7 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", size: 64, flags: DIFlagArtificial, file: !5, scope: !8, baseType: !9)58!8 = !DIFile(filename: "./ab.h", directory: "")59!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, baseType: !10)60!10 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", size: 64, baseType: !11)61!11 = !DISubroutineType(types: !12)62!12 = !{!13}63!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)64!14 = !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 4, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !4, type: !15, containingType: !4)65!15 = !DISubroutineType(types: !16)66!16 = !{null, !17}67!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)68!19 = !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 5, isLocal: false, isDefinition: false, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !4, type: !20, containingType: !4)69!20 = !DISubroutineType(types: !21)70!21 = !{!22, !17}71!22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !23)72!23 = !DIDerivedType(tag: DW_TAG_typedef, name: "foo_t", line: 1, file: !5, baseType: !13)73!26 = distinct !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !27, scope: !4, type: !15, declaration: !14, retainedNodes: !2)74!27 = !DIFile(filename: "b.cpp", directory: "")75!28 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !27, scope: !4, type: !20, declaration: !19, retainedNodes: !2)76!29 = !{i32 2, !"Dwarf Version", i32 3}77!30 = !{i32 1, !"Debug Info Version", i32 3}78!31 = !{!"clang version 3.5 "}79!32 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !26, type: !33)80!33 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)81!34 = !DILocation(line: 0, scope: !26)82!35 = !DILocation(line: 2, scope: !26)83!36 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !33)84!37 = !DILocation(line: 0, scope: !28)85!38 = !DILocation(line: 4, scope: !28)86