brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · c80077f Raw
45 lines · plain
1; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj2; RUN: llvm-dwarfdump -all %t | FileCheck %s3 4; Checks that we don't emit a size for a pointer type.5; CHECK: DW_TAG_pointer_type6; CHECK-NEXT: DW_AT_type7; CHECK-NOT: DW_AT_byte_size8; CHECK: DW_TAG9; CHECK: .debug_info contents10 11%struct.A = type { i32 }12 13define i32 @_Z3fooP1A(ptr %a) nounwind uwtable ssp !dbg !5 {14entry:15  %a.addr = alloca ptr, align 816  store ptr %a, ptr %a.addr, align 817  call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !16, metadata !DIExpression()), !dbg !1718  %0 = load ptr, ptr %a.addr, align 8, !dbg !1819  %1 = load i32, ptr %0, align 4, !dbg !1820  ret i32 %1, !dbg !1821}22 23declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone24 25!llvm.dbg.cu = !{!0}26!llvm.module.flags = !{!21}27 28!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 150996)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !1, imports:  !1)29!1 = !{}30!5 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooP1A", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !20, scope: !6, type: !7)31!6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo")32!7 = !DISubroutineType(types: !8)33!8 = !{!9, !10}34!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)35!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11)36!11 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !20, elements: !12)37!12 = !{!13}38!13 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 1, size: 32, align: 32, file: !20, scope: !11, baseType: !9)39!16 = !DILocalVariable(name: "a", line: 3, arg: 1, scope: !5, file: !6, type: !10)40!17 = !DILocation(line: 3, column: 13, scope: !5)41!18 = !DILocation(line: 4, column: 3, scope: !19)42!19 = distinct !DILexicalBlock(line: 3, column: 16, file: !20, scope: !5)43!20 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo")44!21 = !{i32 1, !"Debug Info Version", i32 3}45