diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-18 17:05:57 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-18 17:05:57 +0000 |
commit | 0ab28b62b1dddf61f7cb832eafd25240e7b7f261 (patch) | |
tree | cfcb3b0c08ae210b8d72860426d5b85895d15019 /llvm/lib/Analysis/PHITransAddr.cpp | |
parent | 2e1fc849b2529c99616896662f50ac6248cb1f7b (diff) | |
download | bcm5719-llvm-0ab28b62b1dddf61f7cb832eafd25240e7b7f261.tar.gz bcm5719-llvm-0ab28b62b1dddf61f7cb832eafd25240e7b7f261.zip |
Use llvm_unreachable for "impossible" situations.
llvm-svn: 119705
Diffstat (limited to 'llvm/lib/Analysis/PHITransAddr.cpp')
-rw-r--r-- | llvm/lib/Analysis/PHITransAddr.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/PHITransAddr.cpp b/llvm/lib/Analysis/PHITransAddr.cpp index 178d29e257d..96081112493 100644 --- a/llvm/lib/Analysis/PHITransAddr.cpp +++ b/llvm/lib/Analysis/PHITransAddr.cpp @@ -15,6 +15,7 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -66,9 +67,10 @@ static bool VerifySubExpr(Value *Expr, // If it isn't in the InstInputs list it is a subexpr incorporated into the // address. Sanity check that it is phi translatable. if (!CanPHITrans(I)) { - errs() << "Non phi translatable instruction found in PHITransAddr, either " - "something is missing from InstInputs or CanPHITrans is wrong:\n"; + errs() << "Non phi translatable instruction found in PHITransAddr:\n"; errs() << *I << '\n'; + llvm_unreachable("Either something is missing from InstInputs or " + "CanPHITrans is wrong."); return false; } @@ -92,9 +94,10 @@ bool PHITransAddr::Verify() const { return false; if (!Tmp.empty()) { - errs() << "PHITransAddr inconsistent, contains extra instructions:\n"; + errs() << "PHITransAddr contains extra instructions:\n"; for (unsigned i = 0, e = InstInputs.size(); i != e; ++i) errs() << " InstInput #" << i << " is " << *InstInputs[i] << "\n"; + llvm_unreachable("This is unexpected."); return false; } |