aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-11 00:54:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-11 00:54:56 +0000
commit5ee0aa715db363a7cdab112627fdd373f477b4df (patch)
treef0dc9fb76e0864862cf25368f81929b4a25bb800
parentdc3c0d20375bda7775b2fade05b20e315798b9fe (diff)
Recognize -fsyntax-only as a "consumer only" action.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86776 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/clang-cc/clang-cc.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index 98e4b28272..85305f86fc 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -1512,9 +1512,6 @@ static ASTConsumer *CreateConsumerAction(const CompilerInvocation &CompOpts,
case ASTView:
return CreateASTViewer();
- case PrintDeclContext:
- return CreateDeclContextPrinter();
-
case DumpRecordLayouts:
return CreateRecordLayoutDumper();
@@ -1552,6 +1549,12 @@ static ASTConsumer *CreateConsumerAction(const CompilerInvocation &CompOpts,
case RewriteBlocks:
return CreateBlockRewriter(InFile, PP.getDiagnostics(),
PP.getLangOptions());
+
+ case ParseSyntaxOnly:
+ return new ASTConsumer();
+
+ case PrintDeclContext:
+ return CreateDeclContextPrinter();
}
}
@@ -1666,12 +1669,6 @@ static void ProcessInputFile(const CompilerInvocation &CompOpts,
break;
}
- case ParseSyntaxOnly: { // -fsyntax-only
- llvm::TimeRegion Timer(ClangFrontendTimer);
- Consumer.reset(new ASTConsumer());
- break;
- }
-
case RewriteMacros:
OS.reset(ComputeOutFile(CompOpts, InFile, 0, true, OutPath));
RewriteMacrosInInput(PP, OS.get());
@@ -1685,7 +1682,6 @@ static void ProcessInputFile(const CompilerInvocation &CompOpts,
break;
case FixIt:
- llvm::TimeRegion Timer(ClangFrontendTimer);
Consumer.reset(new ASTConsumer());
FixItRewrite = new FixItRewriter(PP.getDiagnostics(),
PP.getSourceManager(),