llvm.org GIT mirror llvm / 7a1a3e9
bugpoint: Verify input files Like r233229 for `llvm-link`, start verifying input files to `bugpoint`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233253 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 4 years ago
2 changed file(s) with 10 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
55
66 ; CHECK: call void @foo(), !dbg ![[LOC:[0-9]+]], !attach ![[CALL:[0-9]+]]
77 ; CHECK: ![[LOC]] = !MDLocation(line: 104, column: 105, scope: ![[SCOPE:[0-9]+]])
8 ; CHECK: ![[SCOPE]] = !MDCompileUnit(language: 0, file: ![[FILE:[0-9]+]], producer: "me", isOptimized: true, runtimeVersion: 0, emissionKind: 0, enums: ![[LIST:[0-9]+]], retainedTypes: ![[LIST]])
8 ; CHECK: ![[SCOPE]] = !MDSubprogram(name: "test"
9 ; CHECK-SAME: file: ![[FILE:[0-9]+]]
910 ; CHECK: ![[FILE]] = !MDFile(filename: "source.c", directory: "/dir")
10 ; CHECK: ![[LIST]] = !{i32 0}
1111 ; CHECK: ![[CALL]] = !{!"the call to foo"}
1212
1313 %rust_task = type {}
3030 !3 = !{!"noise"}
3131 !4 = !{!"filler"}
3232
33 !9 = !MDCompileUnit(language: 0, producer: "me", isOptimized: true, emissionKind: 0, file: !15, enums: !16, retainedTypes: !16)
33 !9 = !MDSubprogram(name: "test", file: !15)
3434 !10 = !MDLocation(line: 100, column: 101, scope: !9)
3535 !11 = !MDLocation(line: 102, column: 103, scope: !9)
3636 !12 = !MDLocation(line: 104, column: 105, scope: !9)
3737 !13 = !MDLocation(line: 106, column: 107, scope: !9)
3838 !14 = !MDLocation(line: 108, column: 109, scope: !9)
3939 !15 = !MDFile(filename: "source.c", directory: "/dir")
40 !16 = !{i32 0}
40 !16 = !{}
4141 !17 = !{i32 1, !"Debug Info Version", i32 3}
1515 #include "BugDriver.h"
1616 #include "ToolRunner.h"
1717 #include "llvm/IR/Module.h"
18 #include "llvm/IR/Verifier.h"
1819 #include "llvm/IRReader/IRReader.h"
1920 #include "llvm/Linker/Linker.h"
2021 #include "llvm/Pass.h"
8889 if (!Result) {
8990 Err.print("bugpoint", errs());
9091 return Result;
92 }
93
94 if (verifyModule(*Result, &errs())) {
95 errs() << "bugpoint: " << Filename << ": error: does not verify\n";
96 return std::unique_ptr();
9197 }
9298
9399 // If we don't have an override triple, use the first one to configure