1; RUN: llc -O0 -mtriple=aarch64-apple-ios -global-isel -debug-only=irtranslator \ 2; RUN: -stop-after=irtranslator %s -o - 2>&1 | FileCheck %s 3 4; REQUIRES: asserts 5 6; CHECK: Checking DILocation from %retval = alloca i32, align 4 was copied to G_FRAME_INDEX 7; CHECK: Checking DILocation from %rv = alloca i32, align 4 was copied to G_FRAME_INDEX 8; CHECK: Checking DILocation from store i32 0, i32* %retval, align 4 was copied to G_CONSTANT 9; CHECK: Checking DILocation from store i32 0, i32* %retval, align 4 was copied to G_STORE 10; CHECK: Checking DILocation from store i32 0, i32* %rv, align 4, !dbg !12 was copied to G_STORE debug-location !12; t.cpp:2:5 11; CHECK: Checking DILocation from %0 = load i32, i32* %rv, align 4, !dbg !13 was copied to G_LOAD debug-location !13; t.cpp:3:8 12; CHECK: Checking DILocation from ret i32 %0, !dbg !14 was copied to COPY debug-location !14; t.cpp:3:1 13; CHECK: Checking DILocation from ret i32 %0, !dbg !14 was copied to RET_ReallyLR implicit $w0, debug-location !14; t.cpp:3:1 14 15source_filename = "t.cpp" 16target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" 17target triple = "arm64-unknown-linux-gnu" 18 19; Function Attrs: noinline norecurse nounwind optnone 20define dso_local i32 @main() !dbg !7 { 21entry: 22 %retval = alloca i32, align 4 23 %rv = alloca i32, align 4 24 store i32 0, i32* %retval, align 4 25 call void @llvm.dbg.declare(metadata i32* %rv, metadata !11, metadata !DIExpression()), !dbg !12 26 store i32 0, i32* %rv, align 4, !dbg !12 27 %0 = load i32, i32* %rv, align 4, !dbg !13 28 ret i32 %0, !dbg !14 29} 30 31; Function Attrs: nounwind readnone speculatable 32declare void @llvm.dbg.declare(metadata, metadata, metadata) 33 34!llvm.dbg.cu = !{!0} 35!llvm.module.flags = !{!3, !4, !5} 36!llvm.ident = !{!6} 37 38!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 8.0.0 (trunk) (llvm/trunk 344296)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) 39!1 = !DIFile(filename: "t.cpp", directory: "/Volumes/Data/llvm.org/svn/build") 40!2 = !{} 41!3 = !{i32 2, !"Dwarf Version", i32 4} 42!4 = !{i32 2, !"Debug Info Version", i32 3} 43!5 = !{i32 1, !"wchar_size", i32 4} 44!6 = !{!"clang version 8.0.0 (trunk) (llvm/trunk 344296)"} 45!7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) 46!8 = !DISubroutineType(types: !9) 47!9 = !{!10} 48!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 49!11 = !DILocalVariable(name: "rv", scope: !7, file: !1, line: 2, type: !10) 50!12 = !DILocation(line: 2, column: 5, scope: !7) 51!13 = !DILocation(line: 3, column: 8, scope: !7) 52!14 = !DILocation(line: 3, column: 1, scope: !7) 53 54