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/Driver/clang.cpp b/Driver/clang.cpp
index c297303..71291ae 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -68,7 +68,8 @@
   ParseCFGDump,                 // Parse ASTS. Build CFGs. Print CFGs.
   ParseCFGView,                 // Parse ASTS. Build CFGs. View CFGs.
   AnalysisLiveVariables,        // Print results of live-variable analysis.
-  AnalysisGRSimpleVals,          // Perform graph-reachability constant prop.
+  AnalysisGRSimpleVals,         // Perform graph-reachability constant prop.
+  AnalysisGRSimpleValsView,     // Visualize results of path-sens. analysis.
   WarnDeadStores,               // Run DeadStores checker on parsed ASTs.
   WarnDeadStoresCheck,          // Check diagnostics for "DeadStores".
   WarnUninitVals,               // Run UnitializedVariables checker.
@@ -115,6 +116,8 @@
                         "Flag warnings of uses of unitialized variables."),
              clEnumValN(AnalysisGRSimpleVals, "grsimple",
                         "Perform path-sensitive constant propagation."),
+             clEnumValN(AnalysisGRSimpleValsView, "grsimple-view",
+                        "View results of path-sensitive constant propagation."),
              clEnumValN(TestSerialization, "test-pickling",
                         "Run prototype serializtion code."),
              clEnumValN(EmitLLVM, "emit-llvm",
@@ -974,6 +977,9 @@
     case AnalysisGRSimpleVals:
       return CreateGRSimpleVals(Diag);
       
+    case AnalysisGRSimpleValsView:
+      return CreateGRSimpleVals(Diag, true);
+      
     case TestSerialization:
       return CreateSerializationTest(Diag, FileMgr, LangOpts);