Expanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
object to pretty-print the component of a state that is specific to a checker.

llvm-svn: 48237
diff --git a/clang/Analysis/ValueState.cpp b/clang/Analysis/ValueState.cpp
index 1d428f1..1fc4df9 100644
--- a/clang/Analysis/ValueState.cpp
+++ b/clang/Analysis/ValueState.cpp
@@ -476,13 +476,16 @@
   return I;
 }
 
-void ValueState::printDOT(std::ostream& Out) const {
-  print(Out, "\\l", "\\|");
+void ValueState::printDOT(std::ostream& Out, CheckerStatePrinter* P) const {
+  print(Out, P, "\\l", "\\|");
 }
 
-void ValueState::print(std::ostream& Out,
-                       const char* nl,
-                       const char* sep) const {
+void ValueState::printStdErr(CheckerStatePrinter* P) const {
+  print(*llvm::cerr, P);
+}  
+
+void ValueState::print(std::ostream& Out, CheckerStatePrinter* P,
+                       const char* nl, const char* sep) const {
 
   // Print Variable Bindings
   Out << "Variables:" << nl;
@@ -570,4 +573,9 @@
       }
     }
   }
+  
+  // Print checker-specific data.
+  
+  if (P && CheckerState)
+    P->PrintCheckerState(Out, CheckerState, nl, sep);
 }