forked from OSchip/llvm-project
Actually, use an exception to stop verification. This gives us much better
error messages because verification stops at the first error. llvm-svn: 14794
This commit is contained in:
parent
2c1bc9e7e2
commit
ab1aedab13
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue