forked from OSchip/llvm-project
Remove the now-unused GRState::isEqual method. Instead of asking if an expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value.
llvm-svn: 107638
This commit is contained in:
parent
dace239949
commit
c7c8c3d66b
|
@ -470,9 +470,6 @@ public:
|
|||
|
||||
const GRState* getPersistentState(GRState& Impl);
|
||||
|
||||
bool isEqual(const GRState* state, const Expr* Ex, const llvm::APSInt& V);
|
||||
bool isEqual(const GRState* state, const Expr* Ex, uint64_t);
|
||||
|
||||
//==---------------------------------------------------------------------==//
|
||||
// Generic Data Map methods.
|
||||
//==---------------------------------------------------------------------==//
|
||||
|
|
|
@ -343,28 +343,3 @@ bool GRState::scanReachableSymbols(const MemRegion * const *I,
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Queries.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
bool GRStateManager::isEqual(const GRState* state, const Expr* Ex,
|
||||
const llvm::APSInt& Y) {
|
||||
|
||||
SVal V = state->getSVal(Ex);
|
||||
|
||||
if (loc::ConcreteInt* X = dyn_cast<loc::ConcreteInt>(&V))
|
||||
return X->getValue() == Y;
|
||||
|
||||
if (nonloc::ConcreteInt* X = dyn_cast<nonloc::ConcreteInt>(&V))
|
||||
return X->getValue() == Y;
|
||||
|
||||
if (SymbolRef Sym = V.getAsSymbol())
|
||||
return ConstraintMgr->isEqual(state, Sym, Y);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GRStateManager::isEqual(const GRState* state, const Expr* Ex, uint64_t x) {
|
||||
return isEqual(state, Ex, getBasicVals().getValue(x, Ex->getType()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue