diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-13 08:48:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-13 08:48:04 +0000 |
commit | b3366bc37e81a27d2d830df61fc1425c78523eac (patch) | |
tree | 3b7d54a614ff3b8eadfdd981d56a2535e65fea85 /tools/llvm-as/llvm-as.cpp | |
parent | 00dd5cd3563192d62751c614f23b0b00244f6a1b (diff) | |
download | external_llvm-b3366bc37e81a27d2d830df61fc1425c78523eac.zip external_llvm-b3366bc37e81a27d2d830df61fc1425c78523eac.tar.gz external_llvm-b3366bc37e81a27d2d830df61fc1425c78523eac.tar.bz2 |
Actually, use an exception to stop verification. This gives us much better
error messages because verification stops at the first error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-as/llvm-as.cpp')
-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 406f3e3..0f16db9 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; } |