diff options
Diffstat (limited to 'tools/llvm-as')
-rw-r--r-- | tools/llvm-as/llvm-as.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index 406f3e3339..0f16db9094 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -57,9 +57,13 @@ int main(int argc, char **argv) { return 1; } - if (!DisableVerify && verifyModule(*M.get(), PrintMessageAction)) { + 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; } |