[llvm-commits] [llvm] r119705 - /llvm/trunk/lib/Analysis/PHITransAddr.cpp
Dan Gohman
gohman at apple.com
Thu Nov 18 09:05:57 PST 2010
Author: djg
Date: Thu Nov 18 11:05:57 2010
New Revision: 119705
URL: http://llvm.org/viewvc/llvm-project?rev=119705&view=rev
Log:
Use llvm_unreachable for "impossible" situations.
Modified:
llvm/trunk/lib/Analysis/PHITransAddr.cpp
Modified: llvm/trunk/lib/Analysis/PHITransAddr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PHITransAddr.cpp?rev=119705&r1=119704&r2=119705&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/PHITransAddr.cpp (original)
+++ llvm/trunk/lib/Analysis/PHITransAddr.cpp Thu Nov 18 11:05:57 2010
@@ -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 @@
// 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 @@
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;
}
More information about the llvm-commits
mailing list