[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    [cfe-commits] r60204 - in
From:       Zhongxing Xu <xuzhongxing () gmail ! com>
Date:       2008-11-28 3:07:06
Message-ID: 200811280307.mAS376W4027184 () zion ! cs ! uiuc ! edu
[Download RAW message or body]

Author: zhongxingxu
Date: Thu Nov 27 21:07:05 2008
New Revision: 60204

URL: http://llvm.org/viewvc/llvm-project?rev=60204&view=rev
Log:
Enable the GRStateManager to do something when we finish a path. For example, 
the ConstraintManager can print its internal state before its solver instance is
destroyed.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/ConstraintManager.h
    cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h
    cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/ConstraintManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/ConstraintManager.h?rev=60204&r1=60203&r2=60204&view=diff


==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/ConstraintManager.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/ConstraintManager.h Thu Nov 27 \
21:07:05 2008 @@ -51,6 +51,8 @@
 
   virtual void print(const GRState* St, std::ostream& Out, 
                      const char* nl, const char *sep) = 0;
+
+  virtual void EndPath(const GRState* St) {}
 };
 
 ConstraintManager* CreateBasicConstraintManager(GRStateManager& statemgr);

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h?rev=60204&r1=60203&r2=60204&view=diff


==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRExprEngine.h Thu Nov 27 21:07:05 \
2008 @@ -414,6 +414,7 @@
   ///  nodes when the control reaches the end of a function.
   void ProcessEndPath(EndPathNodeBuilder& builder) {
     getTF().EvalEndPath(*this, builder);
+    StateMgr.EndPath(builder.getState());
   }
   
   GRStateManager& getStateManager() { return StateMgr; }

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h?rev=60204&r1=60203&r2=60204&view=diff


==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h Thu Nov 27 21:07:05 2008
@@ -536,6 +536,10 @@
   const llvm::APSInt* getSymVal(const GRState* St, SymbolID sym) {
     return ConstraintMgr->getSymVal(St, sym);
   }
+
+  void EndPath(const GRState* St) {
+    ConstraintMgr->EndPath(St);
+  }
 };
   
 //===----------------------------------------------------------------------===//


_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic