aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 2bb4422b75..dde1c5737b 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -54,6 +54,7 @@ enum ProgActions {
ParseAST, // Parse ASTs.
ParseCFGDump, // Parse ASTS. Build CFGs. Print CFGs.
ParseCFGView, // Parse ASTS. Build CFGs. View CFGs (Graphviz).
+ AnalysisLiveVariables, // Print results of live-variable analysis.
ParsePrintCallbacks, // Parse and print each callback.
ParseSyntaxOnly, // Parse and perform semantic analysis.
ParseNoop, // Parse with noop callbacks.
@@ -89,9 +90,11 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
clEnumValN(ParseCFGDump, "dump-cfg",
"Run parser, then build and print CFGs."),
clEnumValN(ParseCFGView, "view-cfg",
- "Run parser, then build and view CFGs with Graphviz."),
+ "Run parser, then build and view CFGs with Graphviz."),
+ clEnumValN(AnalysisLiveVariables, "dump-live-variables",
+ "Run parser and print results of live variable analysis."),
clEnumValN(EmitLLVM, "emit-llvm",
- "Build ASTs then convert to LLVM, emit .ll file"),
+ "Build ASTs then convert to LLVM, emit .ll file"),
clEnumValEnd));
//===----------------------------------------------------------------------===//
@@ -846,6 +849,9 @@ static void ProcessInputFile(Preprocessor &PP, unsigned MainFileID,
case ParseCFGView:
DumpCFGs(PP, MainFileID, Stats, true);
break;
+ case AnalysisLiveVariables:
+ AnalyzeLiveVariables(PP, MainFileID);
+ break;
case EmitLLVM:
EmitLLVMFromASTs(PP, MainFileID, Stats);
break;