Author: jrose
Date: Mon Jul  5 23:12:24 2010
New Revision: 107638

URL: http://llvm.org/viewvc/llvm-project?rev=107638&view=rev
Log:
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.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/GRState.h
    cfe/trunk/lib/Checker/GRState.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/GRState.h
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/GRState.h?rev=107638&r1=107637&r2=107638&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/GRState.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/GRState.h Mon Jul  5 23:12:24 
2010
@@ -470,9 +470,6 @@
 
   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.
   //==---------------------------------------------------------------------==//

Modified: cfe/trunk/lib/Checker/GRState.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRState.cpp?rev=107638&r1=107637&r2=107638&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRState.cpp (original)
+++ cfe/trunk/lib/Checker/GRState.cpp Mon Jul  5 23:12:24 2010
@@ -343,28 +343,3 @@
   }
   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()));
-}


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to