diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-06-14 17:36:09 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-06-14 17:36:09 +0000 |
commit | e993e4cd9b515974bd263a84239e89aa8e6e5903 (patch) | |
tree | be76a35c983b5ab2c0f7db1da41180c238555476 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 76cae518cf86c42a1ad833c50f4f1999f1c86d03 (diff) | |
download | bcm5719-llvm-e993e4cd9b515974bd263a84239e89aa8e6e5903.tar.gz bcm5719-llvm-e993e4cd9b515974bd263a84239e89aa8e6e5903.zip |
Support -frewrite-includes as an option while preprocessing.
llvm-svn: 158460
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index d4e47bac4e2..2662844b2ed 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -71,9 +71,13 @@ static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) { case PrintDeclContext: return new DeclContextPrintAction(); case PrintPreamble: return new PrintPreambleAction(); - case PrintPreprocessedInput: return new PrintPreprocessedAction(); + case PrintPreprocessedInput: { + if (CI.getPreprocessorOutputOpts().RewriteIncludes) + return new RewriteIncludesAction(); + return new PrintPreprocessedAction(); + } + case RewriteMacros: return new RewriteMacrosAction(); - case RewriteIncludes: return new RewriteIncludesAction(); case RewriteObjC: return new RewriteObjCAction(); case RewriteTest: return new RewriteTestAction(); case RunAnalysis: return new ento::AnalysisAction(); |