34 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -S -codegenprepare -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s3 4; Make sure salvaging an dbg_declare on inttoptr does not crash.5define void @test(i64 %arg) {6; CHECK-LABEL: define void @test(7; CHECK-SAME: i64 [[ARG:%.*]]) {8; CHECK-NEXT: #dbg_declare(i64 [[ARG]], [[META4:![0-9]+]], !DIExpression(), [[META6:![0-9]+]])9; CHECK-NEXT: ret void10;11 %inttoptr = inttoptr i64 %arg to ptr12 #dbg_declare(ptr %inttoptr, !4, !DIExpression(), !6)13 ret void14}15 16!llvm.dbg.cu = !{!0}17!llvm.module.flags = !{!3}18 19!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 21.0.0git", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2, globals: !2, splitDebugInlining: false, nameTableKind: None)20!1 = !DIFile(filename: "test.cpp", directory: "/home/npopov/repos/llvm-project", checksumkind: CSK_MD5, checksum: "eabd3d442348430f50ca2f8c28d743e9")21!2 = !{}22!3 = !{i32 2, !"Debug Info Version", i32 3}23!4 = !DILocalVariable(name: "c", scope: !5, file: !1, line: 26)24!5 = distinct !DISubprogram(name: "n<(lambda at test.cpp:39:14)>", linkageName: "_ZN1m1nIZN1o1pEvEUl1kE_EE5arrayT_i", scope: null, file: !1, line: 25, spFlags: DISPFlagDefinition, unit: !0)25!6 = !DILocation(line: 26, column: 11, scope: !5)26;.27; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: [[META2:![0-9]+]], globals: [[META2]], splitDebugInlining: false, nameTableKind: None)28; CHECK: [[META1]] = !DIFile(filename: "test.cpp", directory: {{.*}})29; CHECK: [[META2]] = !{}30; CHECK: [[META4]] = !DILocalVariable(name: "c", scope: [[META5:![0-9]+]], file: [[META1]], line: 26)31; CHECK: [[META5]] = distinct !DISubprogram(name: "n<(lambda at test.cpp:39:14)>", linkageName: "_ZN1m1nIZN1o1pEvEUl1kE_EE5arrayT_i", scope: null, file: [[META1]], line: 25, spFlags: DISPFlagDefinition, unit: [[META0]])32; CHECK: [[META6]] = !DILocation(line: 26, column: 11, scope: [[META5]])33;.34