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 | 505569dc9c0a9bc9687dfa0e8e9a90bcb8db7da0 (patch) | |
tree | 157d0f183003c457a0c58534725939a8f735b18a /lib/VMCore/Verifier.cpp | |
parent | 7deb17108fca077f5624da71ffd6be620a0af8c8 (diff) | |
download | external_llvm-505569dc9c0a9bc9687dfa0e8e9a90bcb8db7da0.zip external_llvm-505569dc9c0a9bc9687dfa0e8e9a90bcb8db7da0.tar.gz external_llvm-505569dc9c0a9bc9687dfa0e8e9a90bcb8db7da0.tar.bz2 |
Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 84f9499..b5876a7 100644 --- a/lib/VMCore/Verifier.cpp +++ b/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; } |