]> granicus.if.org Git - clang/commitdiff
Added Profile method to SimulVertex.
authorTed Kremenek <kremenek@apple.com>
Fri, 21 Dec 2007 22:40:41 +0000 (22:40 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 21 Dec 2007 22:40:41 +0000 (22:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45295 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/SimulVertex.h

index 70f9cc36724ddb31df48259b3749f07507e824c7..20ee77c3a03698b992511d58708a9804baf47c85 100644 (file)
 #define LLVM_CLANG_ANALYSIS_PS_ANALYSISVERTEX
 
 #include "llvm/ADT/SmallVector.h"
-#include <iosfwd>
+
+namespace llvm {
+  class FoldingSetID;  
+}
 
 namespace clang {
  
@@ -46,14 +49,20 @@ class SimulVertex {
   AdjacentVertices Succs;
 
 public:
+  typedef typename StateTy StateTy;
+  
   explicit SimulVertex(unsigned ID, const ProgramEdge& loc, StateTy* state)
     : VertexID(ID), Location(loc), State(state) {}
-  
+    
   // Accessors.
   State* getState() const { return State; }
   const ProgramEdge& getLocation() const { return Location; }
   unsigned getVertexID() const { return VertexID; }
   
+  // Profiling (for FoldingSet).
+  void Profile(llvm::FoldingSetNodeID& ID) const {
+    StateTy::Profile(V.getState(),ID);
+  }
 
   // Iterators over successor and predecessor vertices.
   typedef AdjacentVertices::iterator        succ_iterator;
@@ -82,7 +91,7 @@ public:
   void addPredecessor(SimulVertex* V) {
     Preds.push_back(V);
     V.Succs.push_back(V);
-  }  
+  }
 };
   
 } // end namespace clang