diff options
Diffstat (limited to 'lib/Checker/GRState.cpp')
-rw-r--r-- | lib/Checker/GRState.cpp | 20 |
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); } //===----------------------------------------------------------------------===// |