Recognize -fsyntax-only as a "consumer only" action.

llvm-svn: 86776
This commit is contained in:
Daniel Dunbar 2009-11-11 00:54:56 +00:00
parent 20a682de6b
commit 3618834da8
1 changed files with 6 additions and 10 deletions

View File

@ -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(),