diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-12-21 22:40:41 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-12-21 22:40:41 +0000 |
commit | a3b859120923648dc91a0bc7e7c4e471abe10cef (patch) | |
tree | f8500159ffabe4228a64b81eed659f205015ed4c | |
parent | 4c71f1a58e8892fc9f1fe6bdf10bfbe16f592b2d (diff) |
Added Profile method to SimulVertex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45295 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Analysis/PathSensitive/SimulVertex.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/clang/Analysis/PathSensitive/SimulVertex.h b/include/clang/Analysis/PathSensitive/SimulVertex.h index 70f9cc3672..20ee77c3a0 100644 --- a/include/clang/Analysis/PathSensitive/SimulVertex.h +++ b/include/clang/Analysis/PathSensitive/SimulVertex.h @@ -17,7 +17,10 @@ #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 |