55 lines · plain
1; REQUIRES: plugins2; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo -disable-strip-debug-types > /dev/null3; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s4;5; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t-nodebug -bugpoint-crashcalls -silence-passes -disable-namedmd-remove > /dev/null6; RUN: llvm-dis %t-nodebug-reduced-simplified.bc -o - | FileCheck %s --check-prefix=NODEBUG7;8; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t-notype -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo > /dev/null9; RUN: llvm-dis %t-notype-reduced-simplified.bc -o - | FileCheck %s --check-prefix=NOTYPE10;11; Bugpoint can drop the metadata on the call, as it does not contrinute to the crash.12 13; CHECK: call void @foo()14; NODEBUG: call void @foo()15; NOTYPE: call void @foo()16; NODEBUG-NOT: call void @foo()17; NOTYPE-NOT: !DIBasicType18; NOTYPE: !DICompileUnit19; NOTYPE-NOT: !DIBasicType20 21%rust_task = type {}22define void @test(ptr %a, ptr %b) !dbg !9 {23 %s = mul i8 22, 9, !attach !0, !dbg !1024 store i8 %s, ptr %b, !attach !1, !dbg !1125 call void @foo(), !attach !2, !dbg !1226 store i32 7, ptr %a, !attach !3, !dbg !1327 %t = add i32 0, 5, !attach !4, !dbg !1428 ret void29}30 31declare void @foo()32 33!llvm.module.flags = !{!17}34!llvm.dbg.cu = !{!8}35 36!0 = !{!"boring"}37!1 = !{!"uninteresting"}38!2 = !{!"the call to foo"}39!3 = !{!"noise"}40!4 = !{!"filler"}41 42!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !15)43!9 = distinct !DISubprogram(name: "test", file: !15, type: !18, unit: !8)44!10 = !DILocation(line: 100, column: 101, scope: !9)45!11 = !DILocation(line: 102, column: 103, scope: !9)46!12 = !DILocation(line: 104, column: 105, scope: !9)47!13 = !DILocation(line: 106, column: 107, scope: !9)48!14 = !DILocation(line: 108, column: 109, scope: !9)49!15 = !DIFile(filename: "source.c", directory: "/dir")50!16 = !{}51!17 = !{i32 1, !"Debug Info Version", i32 3}52!18 = !DISubroutineType(types: !19)53!19 = !{!20, !20}54!20 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)55