mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Use llvm_unreachable for "impossible" situations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ce56262211
commit
88fc03c461
@ -15,6 +15,7 @@
|
|||||||
#include "llvm/Analysis/Dominators.h"
|
#include "llvm/Analysis/Dominators.h"
|
||||||
#include "llvm/Analysis/InstructionSimplify.h"
|
#include "llvm/Analysis/InstructionSimplify.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
using namespace llvm;
|
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
|
// If it isn't in the InstInputs list it is a subexpr incorporated into the
|
||||||
// address. Sanity check that it is phi translatable.
|
// address. Sanity check that it is phi translatable.
|
||||||
if (!CanPHITrans(I)) {
|
if (!CanPHITrans(I)) {
|
||||||
errs() << "Non phi translatable instruction found in PHITransAddr, either "
|
errs() << "Non phi translatable instruction found in PHITransAddr:\n";
|
||||||
"something is missing from InstInputs or CanPHITrans is wrong:\n";
|
|
||||||
errs() << *I << '\n';
|
errs() << *I << '\n';
|
||||||
|
llvm_unreachable("Either something is missing from InstInputs or "
|
||||||
|
"CanPHITrans is wrong.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,9 +94,10 @@ bool PHITransAddr::Verify() const {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!Tmp.empty()) {
|
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)
|
for (unsigned i = 0, e = InstInputs.size(); i != e; ++i)
|
||||||
errs() << " InstInput #" << i << " is " << *InstInputs[i] << "\n";
|
errs() << " InstInput #" << i << " is " << *InstInputs[i] << "\n";
|
||||||
|
llvm_unreachable("This is unexpected.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user