Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluating
the checker-specific logic of symbolic assumptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49910 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 418129c..e3fe239 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1840,13 +1840,20 @@
 //===----------------------------------------------------------------------===//
 
 ValueState* GRExprEngine::Assume(ValueState* St, LVal Cond,
-                                           bool Assumption, 
-                                           bool& isFeasible) {
+                                 bool Assumption, bool& isFeasible) {
+                                             
+  St = AssumeAux(St, Cond, Assumption, isFeasible);
+  return isFeasible ? St : TF->EvalAssume(St, Cond, Assumption);
+}
+
+ValueState* GRExprEngine::AssumeAux(ValueState* St, LVal Cond,
+                                    bool Assumption, bool& isFeasible) {
+                                       
   switch (Cond.getSubKind()) {
     default:
       assert (false && "'Assume' not implemented for this LVal.");
       return St;
-      
+
     case lval::SymbolValKind:
       if (Assumption)
         return AssumeSymNE(St, cast<lval::SymbolVal>(Cond).getSymbol(),
@@ -1854,8 +1861,8 @@
       else
         return AssumeSymEQ(St, cast<lval::SymbolVal>(Cond).getSymbol(),
                            BasicVals.getZeroWithPtrWidth(), isFeasible);
-      
-      
+
+
     case lval::DeclValKind:
     case lval::FuncValKind:
     case lval::GotoLabelKind:
@@ -1871,8 +1878,14 @@
 }
 
 ValueState* GRExprEngine::Assume(ValueState* St, NonLVal Cond,
-                                         bool Assumption, 
-                                         bool& isFeasible) {  
+                                 bool Assumption, bool& isFeasible) {
+
+  St = AssumeAux(St, Cond, Assumption, isFeasible);
+  return isFeasible ? St : TF->EvalAssume(St, Cond, Assumption);
+}
+
+ValueState* GRExprEngine::AssumeAux(ValueState* St, NonLVal Cond,
+                                    bool Assumption, bool& isFeasible) {  
   switch (Cond.getSubKind()) {
     default:
       assert (false && "'Assume' not implemented for this NonLVal.");