aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/PathSensitive/ExplodedGraph.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-03-04 19:52:15 +0000
committerTed Kremenek <kremenek@apple.com>2008-03-04 19:52:15 +0000
commit7fa6a4079fd68344e4d38c30f7681b3a7d30fbd1 (patch)
treef10e7a90485d67365818fd1aa9203be5cdb2769b /include/clang/Analysis/PathSensitive/ExplodedGraph.h
parent59894f9d4560021b12ff3e0207ae6046bc3b050a (diff)
Fixed another obscure node-caching bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/PathSensitive/ExplodedGraph.h')
-rw-r--r--include/clang/Analysis/PathSensitive/ExplodedGraph.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/clang/Analysis/PathSensitive/ExplodedGraph.h b/include/clang/Analysis/PathSensitive/ExplodedGraph.h
index a56e7d3d14..db5f692699 100644
--- a/include/clang/Analysis/PathSensitive/ExplodedGraph.h
+++ b/include/clang/Analysis/PathSensitive/ExplodedGraph.h
@@ -162,8 +162,16 @@ public:
}
// Profiling (for FoldingSet).
+
+ static inline void Profile(llvm::FoldingSetNodeID& ID,
+ const ProgramPoint& Loc,
+ StateTy state) {
+ ID.Add(Loc);
+ GRTrait<StateTy>::Profile(ID, state);
+ }
+
inline void Profile(llvm::FoldingSetNodeID& ID) const {
- GRTrait<StateTy>::Profile(ID, getState());
+ Profile(ID, getLocation(), getState());
}
// Iterators over successor and predecessor vertices.
@@ -307,8 +315,7 @@ public:
llvm::FoldingSetNodeID profile;
void* InsertPos = 0;
- GRTrait<StateTy>::Profile(profile, State);
- profile.Add(L);
+ NodeTy::Profile(profile, L, State);
NodeTy* V = Nodes.FindNodeOrInsertPos(profile, InsertPos);
if (!V) {