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
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index 2704bf2..1c7df79 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -202,16 +202,17 @@
   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 @@
   }
   
   // Print equality constraints.
+  // FIXME: Make just another printer do this.
   
   if (!ConstEq.isEmpty()) {
   
@@ -278,6 +280,7 @@
   }
 
   // Print != constraints.
+  // FIXME: Make just another printer do this.
     
   if (!ConstNotEq.isEmpty()) {
   
@@ -300,10 +303,8 @@
     }
   }
   
-  // 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);
 }