diff options
author | Chris Lattner <sabre@nondot.org> | 2006-07-06 18:02:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-07-06 18:02:27 +0000 |
commit | 05ac92ca7d448ff9270cdeecd182653477708517 (patch) | |
tree | 98ab4d6907cc940ec14f4510ecde36ffd6e43887 /tools/llvm-as | |
parent | 1d662a6afcbf8afb809e7f40093d2e9e0a888fdc (diff) |
Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-as')
-rw-r--r-- | tools/llvm-as/llvm-as.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index 1dbcd1d1b8..9547ad13e2 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -63,14 +63,14 @@ 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; + 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 (DumpAsm) std::cerr << "Here's the assembly:\n" << *M.get(); |