[cfe-commits] r45295 - /cfe/trunk/include/clang/Analysis/PathSensitive/SimulVertex.h
Ted Kremenek
kremenek at apple.com
Fri Dec 21 14:40:43 PST 2007
Author: kremenek
Date: Fri Dec 21 16:40:41 2007
New Revision: 45295
URL: http://llvm.org/viewvc/llvm-project?rev=45295&view=rev
Log:
Added Profile method to SimulVertex.
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/SimulVertex.h
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/SimulVertex.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/SimulVertex.h?rev=45295&r1=45294&r2=45295&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/SimulVertex.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/SimulVertex.h Fri Dec 21 16:40:41 2007
@@ -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 @@
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 @@
void addPredecessor(SimulVertex* V) {
Preds.push_back(V);
V.Succs.push_back(V);
- }
+ }
};
} // end namespace clang
More information about the cfe-commits
mailing list