Added --grsimple-view option to clang driver; this is the same as
--grsimple except that it visualizes the ExplodedGraph using dot and
outputs the current function being analyzed.  --grsimple is now silent
except when it emits diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47146 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/GRSimpleVals.cpp b/Analysis/GRSimpleVals.cpp
index 1e438ee..e856c3e 100644
--- a/Analysis/GRSimpleVals.cpp
+++ b/Analysis/GRSimpleVals.cpp
@@ -20,7 +20,7 @@
 
 namespace clang {
   void RunGRSimpleVals(CFG& cfg, FunctionDecl& FD, ASTContext& Ctx,
-                      Diagnostic& Diag) {
+                      Diagnostic& Diag, bool Visualize) {
     
     if (Diag.hasErrorOccurred())
       return;
@@ -45,7 +45,7 @@
     }
         
 #ifndef NDEBUG
-    CheckerState->ViewGraph();
+    if (Visualize) CheckerState->ViewGraph();
 #endif  
   }
 } // end clang namespace