diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-27 17:36:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-27 17:36:58 +0000 |
commit | 81e23091d9387a2dd9378feb35e6cda732588081 (patch) | |
tree | dcb04cc945d1f9468cc1c2921dc8d9a65fd61817 | |
parent | 7f2777e8d2d7a8a7cc0c4cade0f590c7882ee9c8 (diff) | |
download | bcm5719-llvm-81e23091d9387a2dd9378feb35e6cda732588081.tar.gz bcm5719-llvm-81e23091d9387a2dd9378feb35e6cda732588081.zip |
Minor cleanup.
llvm-svn: 55423
-rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 84f94991689..b5876a7e98e 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -198,23 +198,22 @@ namespace { /// this condition, do so. /// bool abortIfBroken() { - if (Broken) { - msgs << "Broken module found, "; - switch (action) { - case AbortProcessAction: - msgs << "compilation aborted!\n"; - cerr << msgs.str(); - abort(); - case PrintMessageAction: - msgs << "verification continues.\n"; - cerr << msgs.str(); - return false; - case ReturnStatusAction: - msgs << "compilation terminated.\n"; - return Broken; - } + if (!Broken) return false; + msgs << "Broken module found, "; + switch (action) { + default: assert(0 && "Unknown action"); + case AbortProcessAction: + msgs << "compilation aborted!\n"; + cerr << msgs.str(); + abort(); + case PrintMessageAction: + msgs << "verification continues.\n"; + cerr << msgs.str(); + return false; + case ReturnStatusAction: + msgs << "compilation terminated.\n"; + return Broken; } - return false; } |