1; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s 2 3target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" 4target triple = "aarch64-unknown-linux-android24" 5 6; CHECK: DW_TAG_variable 7; CHECK-NOT: DW_TAG 8; CHECK: DW_AT_LLVM_tag_offset (0x80) 9; CHECK-NEXT: DW_AT_name ("y") 10 11; CHECK: DW_TAG_variable 12; CHECK-NOT: DW_TAG 13; CHECK: DW_AT_LLVM_tag_offset (0x00) 14; CHECK-NEXT: DW_AT_name ("x") 15 16define dso_local void @f() !dbg !14 { 17 %1 = alloca i32, align 4 18 %2 = alloca i32, align 4 19 %3 = bitcast i32* %1 to i8*, !dbg !21 20 %4 = bitcast i32* %2 to i8*, !dbg !21 21 call void @llvm.dbg.value(metadata i32 1, metadata !20, metadata !DIExpression()), !dbg !22 22 store i32 1, i32* %2, align 4, !dbg !23, !tbaa !24 23 call void @llvm.dbg.value(metadata i32* %1, metadata !18, metadata !DIExpression(DW_OP_LLVM_tag_offset, 0, DW_OP_deref)), !dbg !22 24 call void @use(i8* nonnull %3), !dbg !28 25 call void @llvm.dbg.value(metadata i32* %2, metadata !20, metadata !DIExpression(DW_OP_LLVM_tag_offset, 128, DW_OP_deref)), !dbg !22 26 call void @use(i8* nonnull %4), !dbg !29 27 ret void, !dbg !30 28} 29 30declare !dbg !5 void @use(i8*) 31 32declare void @llvm.dbg.value(metadata, metadata, metadata) 33 34!llvm.dbg.cu = !{!0} 35!llvm.module.flags = !{!8, !9, !10, !11, !12} 36!llvm.ident = !{!13} 37 38!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 10.0.0 (git@github.com:llvm/llvm-project.git 5560dd08b99a0e8b0c55116376624e4f967caec5)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None) 39!1 = !DIFile(filename: "dbg.cc", directory: "/tmp") 40!2 = !{} 41!3 = !{!4, !5} 42!4 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) 43!5 = !DISubprogram(name: "use", scope: !1, file: !1, line: 2, type: !6, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) 44!6 = !DISubroutineType(types: !7) 45!7 = !{null, !4} 46!8 = !{i32 7, !"Dwarf Version", i32 4} 47!9 = !{i32 2, !"Debug Info Version", i32 3} 48!10 = !{i32 1, !"wchar_size", i32 4} 49!11 = !{i32 7, !"PIC Level", i32 2} 50!12 = !{i32 7, !"PIE Level", i32 2} 51!13 = !{!"clang version 10.0.0 (git@github.com:llvm/llvm-project.git 5560dd08b99a0e8b0c55116376624e4f967caec5)"} 52!14 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 4, type: !15, scopeLine: 4, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17) 53!15 = !DISubroutineType(types: !16) 54!16 = !{null} 55!17 = !{!18, !20} 56!18 = !DILocalVariable(name: "x", scope: !14, file: !1, line: 5, type: !19) 57!19 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 58!20 = !DILocalVariable(name: "y", scope: !14, file: !1, line: 5, type: !19) 59!21 = !DILocation(line: 5, column: 3, scope: !14) 60!22 = !DILocation(line: 0, scope: !14) 61!23 = !DILocation(line: 5, column: 10, scope: !14) 62!24 = !{!25, !25, i64 0} 63!25 = !{!"int", !26, i64 0} 64!26 = !{!"omnipotent char", !27, i64 0} 65!27 = !{!"Simple C++ TBAA"} 66!28 = !DILocation(line: 6, column: 3, scope: !14) 67!29 = !DILocation(line: 7, column: 3, scope: !14) 68!30 = !DILocation(line: 8, column: 1, scope: !14) 69