aboutsummaryrefslogtreecommitdiff
path: root/lib/FrontendTool
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-06-14 17:36:09 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-06-14 17:36:09 +0000
commitf1492f970c7c6eb85dc18f13fb864b185bed1d23 (patch)
tree875c38448273876073b53c0b8287d7135eba0b71 /lib/FrontendTool
parentbae2b31822e3c2139b5f8fbb127e4c5674cce6db (diff)
Support -frewrite-includes as an option while preprocessing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/FrontendTool')
-rw-r--r--lib/FrontendTool/ExecuteCompilerInvocation.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index d4e47bac4e..2662844b2e 100644
--- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/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();