diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-09 21:24:02 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-09 21:24:02 +0000 |
commit | 86a3ef5b03b2cc7c70b5d8870775e7fc40069f00 (patch) | |
tree | eb3c2fc04eb49480636bcf2a4b5101975e7ab663 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 7ad13f259f203d6d25bbe263c38e55976a521c33 (diff) | |
download | bcm5719-llvm-86a3ef5b03b2cc7c70b5d8870775e7fc40069f00.tar.gz bcm5719-llvm-86a3ef5b03b2cc7c70b5d8870775e7fc40069f00.zip |
Add -frewrite-imports flag.
If specified, when preprocessing, the contents of imported .pcm files will be
included in preprocessed output. The resulting preprocessed file can then be
compiled standalone without the module sources or .pcm files.
llvm-svn: 305116
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 1f7493c9e39..a7c140188b3 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -85,7 +85,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) { case PrintDeclContext: return llvm::make_unique<DeclContextPrintAction>(); case PrintPreamble: return llvm::make_unique<PrintPreambleAction>(); case PrintPreprocessedInput: { - if (CI.getPreprocessorOutputOpts().RewriteIncludes) + if (CI.getPreprocessorOutputOpts().RewriteIncludes || + CI.getPreprocessorOutputOpts().RewriteImports) return llvm::make_unique<RewriteIncludesAction>(); return llvm::make_unique<PrintPreprocessedAction>(); } |