40 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=strip-debug-info --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t2; RUN: FileCheck --check-prefix=CHECK-FINAL %s --input-file=%t3 4; CHECK-INTERESTINGNESS: define i32 @main5; CHECK-FINAL: define i32 @main6; CHECK-FINAL-NOT: !dbg7; CHECK-FINAL-NOT: call {{.*}}llvm.dbg8; CHECK-FINAL-NOT: !llvm.dbg9; CHECK-FINAL-NOT: = !DI10 11define i32 @main() !dbg !4 {12entry:13 %retval = alloca i32, align 414 %a = alloca i8, align 115 store i32 0, ptr %retval, align 416 call void @llvm.dbg.declare(metadata ptr %a, metadata !10, metadata !DIExpression()), !dbg !1217 store i8 0, ptr %a, align 1, !dbg !1218 ret i32 0, !dbg !1319}20 21declare void @llvm.dbg.declare(metadata, metadata, metadata)22 23!llvm.dbg.cu = !{!0}24!llvm.module.flags = !{!2, !3}25 26!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 16.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)27!1 = !DIFile(filename: "/tmp/a.c", directory: "/tmp", checksumkind: CSK_MD5, checksum: "2ed6e287521b82331926229153026511")28!2 = !{i32 7, !"Dwarf Version", i32 5}29!3 = !{i32 2, !"Debug Info Version", i32 3}30!4 = distinct !DISubprogram(name: "main", scope: !5, file: !5, line: 4, type: !6, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !9)31!5 = !DIFile(filename: "/tmp/a.c", directory: "", checksumkind: CSK_MD5, checksum: "2ed6e287521b82331926229153026511")32!6 = !DISubroutineType(types: !7)33!7 = !{!8}34!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)35!9 = !{}36!10 = !DILocalVariable(name: "a", scope: !4, file: !5, line: 6, type: !11)37!11 = !DIBasicType(name: "_Bool", size: 8, encoding: DW_ATE_boolean)38!12 = !DILocation(line: 6, column: 8, scope: !4)39!13 = !DILocation(line: 7, column: 2, scope: !4)40