llvm.org GIT mirror llvm / da27c36
Disable fatal errors in the Verifier instantiated by bugpoint's crash debugger. When bugpoint hacks at a testcase it may at one point create illegal debug info metadata that won't even pass the Verifier. A bugpoint *driver* built with assertions should not assert on it, but reject the malformed intermediate step and continue to do its job. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284490 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian Prantl 2 years ago
2 changed file(s) with 25 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s
1 ; REQUIRES: loadable_module
2 ; CHECK: All DICompileUnits must be listed in llvm.dbg.cu
3
4 ; When bugpoint hacks at this testcase it will at one point create illegal IR
5 ; that won't even pass the Verifier. A bugpoint *driver* built with assertions
6 ; should not assert on it, but reject the malformed intermediate step.
7 define void @f() !dbg !9 { ret void }
8 !llvm.dbg.cu = !{!0, !1, !2, !3, !4, !5}
9 !0 = distinct !DICompileUnit(language: 12, file: !6)
10 !1 = distinct !DICompileUnit(language: 12, file: !6)
11 !2 = distinct !DICompileUnit(language: 12, file: !6)
12 !3 = distinct !DICompileUnit(language: 12, file: !6)
13 !4 = distinct !DICompileUnit(language: 12, file: !6)
14 !5 = distinct !DICompileUnit(language: 12, file: !6)
15 !6 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
16
17 !llvm.module.flags = !{!7, !8}
18 !7 = !{i32 2, !"Dwarf Version", i32 4}
19 !8 = !{i32 2, !"Debug Info Version", i32 3}
20
21 !9 = distinct !DISubprogram(unit: !0)
732732
733733 // Verify that this is still valid.
734734 legacy::PassManager Passes;
735 Passes.add(createVerifierPass());
735 Passes.add(createVerifierPass(/*FatalErrors=*/false));
736736 Passes.run(*M);
737737
738738 // Try running on the hacked up program...
808808
809809 // Verify that this is still valid.
810810 legacy::PassManager Passes;
811 Passes.add(createVerifierPass());
811 Passes.add(createVerifierPass(/*FatalErrors=*/false));
812812 Passes.run(*M);
813813
814814 // Try running on the hacked up program...
875875
876876 // Verify that this is still valid.
877877 legacy::PassManager Passes;
878 Passes.add(createVerifierPass());
878 Passes.add(createVerifierPass(/*FatalErrors=*/false));
879879 Passes.run(*M);
880880
881881 // Try running on the hacked up program...