aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-08 18:04:06 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-08 18:04:06 +0000
commite603df40d4dc88c28cc1b0c7159e8a1108cf8f16 (patch)
tree18ea2296a9e4dfe6c0028e720dbb9a1fd51a48ed /Driver/clang.cpp
parent94b3cdb57fd5d245963e597626e0dfd88d479795 (diff)
Added most of the boilerplate to the driver needed to run the graph-reachability
constant propagation analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index cdcbb34a51..50ff6d0162 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -64,6 +64,7 @@ enum ProgActions {
ParseCFGDump, // Parse ASTS. Build CFGs. Print CFGs.
ParseCFGView, // Parse ASTS. Build CFGs. View CFGs.
AnalysisLiveVariables, // Print results of live-variable analysis.
+ AnalysisGRConstProp, // Perform graph-reachability constant prop.
WarnDeadStores, // Run DeadStores checker on parsed ASTs.
WarnDeadStoresCheck, // Check diagnostics for "DeadStores".
WarnUninitVals, // Run UnitializedVariables checker.
@@ -108,6 +109,8 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
"Flag warnings of stores to dead variables."),
clEnumValN(WarnUninitVals, "warn-uninit-values",
"Flag warnings of uses of unitialized variables."),
+ clEnumValN(AnalysisGRConstProp, "gr-const-prop",
+ "Perform path-sensitive constant propagation."),
clEnumValN(TestSerialization, "test-pickling",
"Run prototype serializtion code."),
clEnumValN(EmitLLVM, "emit-llvm",
@@ -925,6 +928,9 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
case WarnUninitVals:
return CreateUnitValsChecker(Diag);
+ case AnalysisGRConstProp:
+ return CreateGRConstProp();
+
case TestSerialization:
return CreateSerializationTest(Diag, FileMgr, LangOpts);