aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRState.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-08-13 21:24:49 +0000
committerTed Kremenek <kremenek@apple.com>2008-08-13 21:24:49 +0000
commitae6814efb6c41bd0c0f6413d25097105284d5be7 (patch)
tree0f09f995a705f6c7dd77ec17f6c0dec040641733 /lib/Analysis/GRState.cpp
parent7ba378a9289e807736ed4f24f015b8812ef5939a (diff)
Renamed GRState::CheckerStatePrinter to GRState::Printer.
Updated checker state printer interface to allow transfer functions to return an arbitrary number of GRState::Printers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRState.cpp')
-rw-r--r--lib/Analysis/GRState.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index 2704bf2f37..1c7df79c02 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -202,16 +202,17 @@ const GRState* GRStateManager::getPersistentState(GRState& State) {
return I;
}
-void GRState::printDOT(std::ostream& Out, CheckerStatePrinter* P) const {
- print(Out, P, "\\l", "\\|");
+void GRState::printDOT(std::ostream& Out,
+ Printer** Beg, Printer** End) const {
+ print(Out, Beg, End, "\\l", "\\|");
}
-void GRState::printStdErr(CheckerStatePrinter* P) const {
- print(*llvm::cerr, P);
+void GRState::printStdErr(Printer** Beg, Printer** End) const {
+ print(*llvm::cerr, Beg, End);
}
-void GRState::print(std::ostream& Out, CheckerStatePrinter* P,
- const char* nl, const char* sep) const {
+void GRState::print(std::ostream& Out, Printer** Beg, Printer** End,
+ const char* nl, const char* sep) const {
// Print Variable Bindings
Out << "Variables:" << nl;
@@ -264,6 +265,7 @@ void GRState::print(std::ostream& Out, CheckerStatePrinter* P,
}
// Print equality constraints.
+ // FIXME: Make just another printer do this.
if (!ConstEq.isEmpty()) {
@@ -278,6 +280,7 @@ void GRState::print(std::ostream& Out, CheckerStatePrinter* P,
}
// Print != constraints.
+ // FIXME: Make just another printer do this.
if (!ConstNotEq.isEmpty()) {
@@ -300,10 +303,8 @@ void GRState::print(std::ostream& Out, CheckerStatePrinter* P,
}
}
- // Print checker-specific data.
-
- if (P && CheckerState)
- P->PrintCheckerState(Out, CheckerState, nl, sep);
+ // Print checker-specific data.
+ for ( ; Beg != End ; ++Beg) (*Beg)->Print(Out, this, nl, sep);
}