aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRState.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-03-05 04:45:36 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-03-05 04:45:36 +0000
commitc179a7fbb294fe3ff6cf5479f6239a10f39628c7 (patch)
tree1b7a5ec11a5f781c14dc6dcb4bf6fc109aa56e2f /lib/Checker/GRState.cpp
parentfdf30aee637038bd89c42b04d912a04de4a59133 (diff)
Remove reference to AnalysisContext in Environment. We already have LocationContext
information in ExplodedNode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRState.cpp')
-rw-r--r--lib/Checker/GRState.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/Checker/GRState.cpp b/lib/Checker/GRState.cpp
index ce7d6e2a83..97ede1d480 100644
--- a/lib/Checker/GRState.cpp
+++ b/lib/Checker/GRState.cpp
@@ -23,12 +23,6 @@ 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)
@@ -105,7 +99,7 @@ const GRState *GRState::BindExpr(const Stmt* Ex, SVal V, bool Invalidate) const{
const GRState* GRStateManager::getInitialState(const LocationContext *InitLoc) {
GRState State(this,
- EnvMgr.getInitialEnvironment(InitLoc->getAnalysisContext()),
+ EnvMgr.getInitialEnvironment(),
StoreMgr->getInitialStore(InitLoc),
GDMFactory.GetEmptyMap());
@@ -137,14 +131,12 @@ const GRState* GRState::makeWithStore(Store store) const {
// State pretty-printing.
//===----------------------------------------------------------------------===//
-void GRState::print(llvm::raw_ostream& Out, const char* nl,
+void GRState::print(llvm::raw_ostream& Out, CFG &C, const char* nl,
const char* sep) const {
// Print the store.
GRStateManager &Mgr = getStateManager();
Mgr.getStoreManager().print(getStore(), Out, nl, sep);
- CFG &C = *getAnalysisContext().getCFG();
-
// Print Subexpression bindings.
bool isFirst = true;
@@ -192,12 +184,12 @@ void GRState::print(llvm::raw_ostream& Out, const char* nl,
}
}
-void GRState::printDOT(llvm::raw_ostream& Out) const {
- print(Out, "\\l", "\\|");
+void GRState::printDOT(llvm::raw_ostream& Out, CFG &C) const {
+ print(Out, C, "\\l", "\\|");
}
-void GRState::printStdErr() const {
- print(llvm::errs());
+void GRState::printStdErr(CFG &C) const {
+ print(llvm::errs(), C);
}
//===----------------------------------------------------------------------===//