[cfe-commits] r71092 - in /cfe/branches/Apple/Dib: include/clang/Driver/ArgList.h include/clang/Driver/Options.def lib/Driver/Driver.cpp
Mike Stump
mrs at apple.com
Wed May 6 11:15:28 PDT 2009
Author: mrs
Date: Wed May 6 13:15:09 2009
New Revision: 71092
URL: http://llvm.org/viewvc/llvm-project?rev=71092&view=rev
Log:
Merge in 71056:
Add --analyze-auto.
- Currently just an alias for --analyze, eventually we want to refit
--analyze so that it is less automatic (i.e., does not force plist
output and does not hard code the list of checks).
Modified:
cfe/branches/Apple/Dib/include/clang/Driver/ArgList.h
cfe/branches/Apple/Dib/include/clang/Driver/Options.def
cfe/branches/Apple/Dib/lib/Driver/Driver.cpp
Modified: cfe/branches/Apple/Dib/include/clang/Driver/ArgList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/Driver/ArgList.h?rev=71092&r1=71091&r2=71092&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/include/clang/Driver/ArgList.h (original)
+++ cfe/branches/Apple/Dib/include/clang/Driver/ArgList.h Wed May 6 13:15:09 2009
@@ -74,6 +74,9 @@
bool hasArg(options::ID Id, bool Claim=true) const {
return getLastArg(Id, Claim) != 0;
}
+ bool hasArg(options::ID Id0, options::ID Id1, bool Claim=true) const {
+ return getLastArg(Id0, Id1, Claim) != 0;
+ }
/// getLastArg - Return the last argument matching \arg Id, or null.
///
Modified: cfe/branches/Apple/Dib/include/clang/Driver/Options.def
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/Driver/Options.def?rev=71092&r1=71091&r2=71092&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/include/clang/Driver/Options.def (original)
+++ cfe/branches/Apple/Dib/include/clang/Driver/Options.def Wed May 6 13:15:09 2009
@@ -127,6 +127,7 @@
OPTION("--CLASSPATH=", _CLASSPATH_EQ, Joined, INVALID, fclasspath_EQ, "", 0, 0, 0)
OPTION("--CLASSPATH", _CLASSPATH, Separate, INVALID, fclasspath_EQ, "J", 0, 0, 0)
OPTION("--all-warnings", _all_warnings, Flag, INVALID, Wall, "", 0, 0, 0)
+OPTION("--analyze-auto", _analyze_auto, Flag, INVALID, INVALID, "d", 0, 0, 0)
OPTION("--analyze", _analyze, Flag, INVALID, INVALID, "d", 0,
"Run the static analyzer", 0)
OPTION("--ansi", _ansi, Flag, INVALID, ansi, "", 0, 0, 0)
Modified: cfe/branches/Apple/Dib/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Driver/Driver.cpp?rev=71092&r1=71091&r2=71092&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/lib/Driver/Driver.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Driver/Driver.cpp Wed May 6 13:15:09 2009
@@ -661,7 +661,8 @@
// -{fsyntax-only,-analyze,emit-llvm,S} only run up to the compiler.
} else if ((FinalPhaseArg = Args.getLastArg(options::OPT_fsyntax_only)) ||
- (FinalPhaseArg = Args.getLastArg(options::OPT__analyze)) ||
+ (FinalPhaseArg = Args.getLastArg(options::OPT__analyze,
+ options::OPT__analyze_auto)) ||
(FinalPhaseArg = Args.getLastArg(options::OPT_S))) {
FinalPhase = phases::Compile;
@@ -762,7 +763,7 @@
case phases::Compile: {
if (Args.hasArg(options::OPT_fsyntax_only)) {
return new CompileJobAction(Input, types::TY_Nothing);
- } else if (Args.hasArg(options::OPT__analyze)) {
+ } else if (Args.hasArg(options::OPT__analyze, options::OPT__analyze_auto)) {
return new AnalyzeJobAction(Input, types::TY_Plist);
} else if (Args.hasArg(options::OPT_emit_llvm) ||
Args.hasArg(options::OPT_flto) ||
More information about the cfe-commits
mailing list