aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRState.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-03-04 09:04:52 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-03-04 09:04:52 +0000
commit57d3b76761bdba265769deb497afa784935602be (patch)
tree2d6e2e3f667aaa22d167c011322684b667ac5ca8 /lib/Checker/GRState.cpp
parent468ec6c0266e48fccb26ce50d5b915c645bb3c7b (diff)
When profiling Environment, also profile with AnalysisContext*, bacause
we now may have identical states with different analysis context. Set the right AnalysisContext in state when entering and leaving a callee. With both of the above changes, we can pass the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRState.cpp')
-rw-r--r--lib/Checker/GRState.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Checker/GRState.cpp b/lib/Checker/GRState.cpp
index 592f930316..ce7d6e2a83 100644
--- a/lib/Checker/GRState.cpp
+++ b/lib/Checker/GRState.cpp
@@ -23,6 +23,12 @@ using namespace clang;
// FIXME: Move this elsewhere.
ConstraintManager::~ConstraintManager() {}
+const GRState *GRState::setAnalysisContext(AnalysisContext *ctx) const {
+ GRState NewState = *this;
+ NewState.Env.setAnalysisContext(ctx);
+ return StateMgr->getPersistentState(NewState);
+}
+
GRStateManager::~GRStateManager() {
for (std::vector<GRState::Printer*>::iterator I=Printers.begin(),
E=Printers.end(); I!=E; ++I)