[cfe-commits] r38827 - /cfe/cfe/trunk/Driver/clang.cpp
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:24:58 PDT 2007
Author: sabre
Date: Wed Jul 11 11:24:58 2007
New Revision: 38827
URL: http://llvm.org/viewvc/llvm-project?rev=38827&view=rev
Log:
Add a -fsyntax-only argument
Modified:
cfe/cfe/trunk/Driver/clang.cpp
Modified: cfe/cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.cpp?rev=38827&r1=38826&r2=38827&view=diff
==============================================================================
--- cfe/cfe/trunk/Driver/clang.cpp (original)
+++ cfe/cfe/trunk/Driver/clang.cpp Wed Jul 11 11:24:58 2007
@@ -47,6 +47,7 @@
enum ProgActions {
ParsePrintCallbacks, // Parse and print each callback.
ParseNoop, // Parse with noop callbacks.
+ ParseSyntaxOnly, // Parse and perform semantic analysis.
RunPreprocessorOnly, // Just lex, no output.
PrintPreprocessedInput, // -E mode.
DumpTokens // Token dump mode.
@@ -54,7 +55,7 @@
static cl::opt<ProgActions>
ProgAction(cl::desc("Choose output type:"), cl::ZeroOrMore,
- cl::init(ParseNoop),
+ cl::init(ParseSyntaxOnly),
cl::values(
clEnumValN(RunPreprocessorOnly, "Eonly",
"Just run preprocessor, no output (for timings)"),
@@ -62,6 +63,8 @@
"Run preprocessor, emit preprocessed file"),
clEnumValN(DumpTokens, "dumptokens",
"Run preprocessor, dump internal rep of tokens"),
+ clEnumValN(ParseSyntaxOnly, "fsyntax-only",
+ "Run parser and perform semantic analysis"),
clEnumValN(ParsePrintCallbacks, "parse-print-callbacks",
"Run parser and print each callback invoked"),
clEnumValN(ParseNoop, "parse-noop",
@@ -745,11 +748,12 @@
break;
case ParseNoop: // -parse-noop
- ParseFile(PP, new ParserActions(), MainFileID);
- break;
case ParsePrintCallbacks:
//ParseFile(PP, new ParserPrintActions(PP), MainFileID);
break;
+ case ParseSyntaxOnly: // -fsyntax-only
+ ParseFile(PP, new ParserActions(), MainFileID);
+ break;
}
if (Stats) {
More information about the cfe-commits
mailing list