aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/ProgramPoint.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-03-03 19:29:58 +0000
committerTed Kremenek <kremenek@apple.com>2008-03-03 19:29:58 +0000
commit5226755ab5ce6346f98b5f41cdcffbe84c5bb484 (patch)
tree0aea99ec0e3a441d929275b3bbdffe505afda40b /include/clang/Analysis/ProgramPoint.h
parent37958ee2750db056dc276f045cc8876f2eab2984 (diff)
Fixed subtle caching bug in ExplodedGraph that would cause some nodes to
be incorrectly merged together. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/ProgramPoint.h')
-rw-r--r--include/clang/Analysis/ProgramPoint.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h
index 45ec936e9a..a046268cfd 100644
--- a/include/clang/Analysis/ProgramPoint.h
+++ b/include/clang/Analysis/ProgramPoint.h
@@ -18,6 +18,7 @@
#include "clang/AST/CFG.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/FoldingSet.h"
#include <cassert>
namespace clang {
@@ -45,7 +46,12 @@ public:
static bool classof(const ProgramPoint*) { return true; }
bool operator==(const ProgramPoint & RHS) const { return Data == RHS.Data; }
- bool operator!=(const ProgramPoint& RHS) const { return Data != RHS.Data; }
+ bool operator!=(const ProgramPoint& RHS) const { return Data != RHS.Data; }
+
+ void Profile(llvm::FoldingSetNodeID& ID) const {
+ ID.AddInteger(getKind());
+ ID.AddPointer(getRawPtr());
+ }
};
class BlockEntrance : public ProgramPoint {