diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-06-18 01:23:53 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-06-18 01:23:53 +0000 |
commit | b65be70779bdaf75e91731bfd89362bf4118ae31 (patch) | |
tree | b1a7849d66d0760f5e0ac3d61a8cbd02f0072e4e /lib/Analysis/GRState.cpp | |
parent | 3a7720368937e69c3d1ddab353667f256827717f (diff) |
Remove more dependencies on GRStateRef. As a consequence, we can now
pretty-print a GRState object anywhere it is referenced (instead of
needing a GRStateRef of a GRStateManager handy).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRState.cpp')
-rw-r--r-- | lib/Analysis/GRState.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp index 20e4d1f8a9..ee8cfa43e1 100644 --- a/lib/Analysis/GRState.cpp +++ b/lib/Analysis/GRState.cpp @@ -101,13 +101,9 @@ const GRState* GRState::makeWithStore(Store store) const { // State pretty-printing. //===----------------------------------------------------------------------===// -void GRState::print(std::ostream& Out, StoreManager& StoreMgr, - ConstraintManager& ConstraintMgr, - Printer** Beg, Printer** End, - const char* nl, const char* sep) const { - +void GRState::print(std::ostream& Out, const char* nl, const char* sep) const { // Print the store. - StoreMgr.print(getStore(), Out, nl, sep); + Mgr->getStoreManager().print(getStore(), Out, nl, sep); // Print Subexpression bindings. bool isFirst = true; @@ -147,24 +143,21 @@ void GRState::print(std::ostream& Out, StoreManager& StoreMgr, I.getData().print(Out); } - ConstraintMgr.print(this, Out, nl, sep); + Mgr->getConstraintManager().print(this, Out, nl, sep); - // Print checker-specific data. - for ( ; Beg != End ; ++Beg) (*Beg)->Print(Out, this, nl, sep); + // Print checker-specific data. + for (std::vector<Printer*>::iterator I = Mgr->Printers.begin(), + E = Mgr->Printers.end(); I != E; ++I) { + (*I)->Print(Out, this, nl, sep); + } } -void GRStateRef::printDOT(std::ostream& Out) const { +void GRState::printDOT(std::ostream& Out) const { print(Out, "\\l", "\\|"); } -void GRStateRef::printStdErr() const { +void GRState::printStdErr() const { print(*llvm::cerr); -} - -void GRStateRef::print(std::ostream& Out, const char* nl, const char* sep)const{ - GRState::Printer **beg = Mgr->Printers.empty() ? 0 : &Mgr->Printers[0]; - GRState::Printer **end = !beg ? 0 : beg + Mgr->Printers.size(); - St->print(Out, *Mgr->StoreMgr, *Mgr->ConstraintMgr, beg, end, nl, sep); } //===----------------------------------------------------------------------===// |