diff options
Diffstat (limited to 'tools/llvm2cpp/llvm2cpp.cpp')
-rw-r--r-- | tools/llvm2cpp/llvm2cpp.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/llvm2cpp/llvm2cpp.cpp b/tools/llvm2cpp/llvm2cpp.cpp index 9035e71c07..7e322dbef8 100644 --- a/tools/llvm2cpp/llvm2cpp.cpp +++ b/tools/llvm2cpp/llvm2cpp.cpp @@ -59,14 +59,16 @@ int main(int argc, char **argv) { return 1; } - try { - if (!DisableVerify) - verifyModule(*M.get(), ThrowExceptionAction); - } catch (const std::string &Err) { - std::cerr << argv[0] - << ": assembly parsed, but does not verify as correct!\n"; - std::cerr << Err; - return 1; + // FIXME: llvm2cpp should read .bc files and thus not run the verifier + // explicitly! + if (!DisableVerify) { + std::string Err; + if (verifyModule(*M.get(), ReturnStatusAction, &Err)) { + std::cerr << argv[0] + << ": assembly parsed, but does not verify as correct!\n"; + std::cerr << Err; + return 1; + } } if (OutputFilename != "") { // Specified an output filename? |