summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-10 22:16:52 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-10 22:16:52 +0000
commit4a78c3ae11c4e3002bbed268b4e62d19e53f4df5 (patch)
treea35cfcc7a6b92ec26908ef2b564ab14d96e89f6e /clang/Driver/clang.cpp
parent53336d80557b81c54793085280c026dd218f0c75 (diff)
downloadbcm5719-llvm-4a78c3ae11c4e3002bbed268b4e62d19e53f4df5.tar.gz
bcm5719-llvm-4a78c3ae11c4e3002bbed268b4e62d19e53f4df5.zip
Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver. Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref. llvm-svn: 49500
Diffstat (limited to 'clang/Driver/clang.cpp')
-rw-r--r--clang/Driver/clang.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index 6c82f195722..4c8a3525c82 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -122,11 +122,9 @@ 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(AnalysisGRSimpleVals, "grsimple",
+ clEnumValN(AnalysisGRSimpleVals, "checker-simple",
"Perform path-sensitive constant propagation."),
- clEnumValN(AnalysisGRSimpleValsView, "grsimple-view",
- "View results of path-sensitive constant propagation."),
- clEnumValN(CheckerCFRef, "check-cfref",
+ clEnumValN(CheckerCFRef, "checker-cfref",
"Run the Core Foundation reference count checker."),
clEnumValN(TestSerialization, "test-pickling",
"Run prototype serialization code."),
@@ -153,6 +151,10 @@ static llvm::cl::opt<bool>
VerifyDiagnostics("verify",
llvm::cl::desc("Verify emitted diagnostics and warnings."));
+static llvm::cl::opt<bool>
+VisualizeEG("visualize-egraph",
+ llvm::cl::desc("Display static analysis Exploded Graph."));
+
static llvm::cl::opt<std::string>
HTMLDiag("html-diags",
llvm::cl::desc("Generate HTML to report diagnostics"),
@@ -480,10 +482,9 @@ AnalyzeSpecificFunction("analyze-function",
llvm::cl::desc("Run analysis on specific function."));
static llvm::cl::opt<bool>
-TrimGraph("trim-path-graph",
+TrimGraph("trim-egraph",
llvm::cl::desc("Only show error-related paths in the analysis graph."));
-
//===----------------------------------------------------------------------===//
// Target Triple Processing.
//===----------------------------------------------------------------------===//
@@ -1052,14 +1053,12 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
return CreateUnitValsChecker(Diag);
case AnalysisGRSimpleVals:
- return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, OutputFile);
-
- case AnalysisGRSimpleValsView:
return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, OutputFile,
- true, TrimGraph);
+ VisualizeEG, TrimGraph);
case CheckerCFRef:
- return CreateCFRefChecker(Diag, AnalyzeSpecificFunction, OutputFile);
+ return CreateCFRefChecker(Diag, AnalyzeSpecificFunction, OutputFile,
+ VisualizeEG, TrimGraph);
case TestSerialization:
return CreateSerializationTest(Diag, FileMgr, LangOpts);
OpenPOWER on IntegriCloud