diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-18 21:21:23 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-18 21:21:23 +0000 |
commit | cb33093b4d342c01b8d01e3a2879da4644a5639e (patch) | |
tree | 207abde5a6cecb95ded592144a0624efd4df8751 /Driver/clang.cpp | |
parent | f0c8ef0237ad135480b56c886abef1f137400cfc (diff) |
Running -grsimple now emits diagnostics about the time spent analyzing each function. Will
probably make this a separate command line option later.
Added "--analyze-function" option to the driver to (gradually) allow different
analyses to only be run on specific functions. Currently only --grsimple uses
this option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r-- | Driver/clang.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 4c6a47c90d..08eef52acc 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -449,6 +449,14 @@ static void InitializeDiagnostics(Diagnostic &Diags) { } //===----------------------------------------------------------------------===// +// Analysis-specific options. +//===----------------------------------------------------------------------===// + +static llvm::cl::opt<std::string> +AnalyzeSpecificFunction("analyze-function", + llvm::cl::desc("Run analysis on specific function.")); + +//===----------------------------------------------------------------------===// // Target Triple Processing. //===----------------------------------------------------------------------===// @@ -982,10 +990,10 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile, return CreateUnitValsChecker(Diag); case AnalysisGRSimpleVals: - return CreateGRSimpleVals(Diag); + return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction); case AnalysisGRSimpleValsView: - return CreateGRSimpleVals(Diag, true); + return CreateGRSimpleVals(Diag, AnalyzeSpecificFunction, true); case TestSerialization: return CreateSerializationTest(Diag, FileMgr, LangOpts); |