diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-06 00:32:01 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-06 00:32:01 +0000 |
commit | 1893475d95c4203c597163ea2aa9efbbc3d1dfba (patch) | |
tree | 9c0269e950c523080aadc45064bec10d017b7663 /clang/lib/Frontend/FrontendAction.cpp | |
parent | 543b4c2fed417650e376e945fadc437280fbc8c4 (diff) | |
download | bcm5719-llvm-1893475d95c4203c597163ea2aa9efbbc3d1dfba.tar.gz bcm5719-llvm-1893475d95c4203c597163ea2aa9efbbc3d1dfba.zip |
Retain header search and preprocessing options from AST file when emitting
preprocessed text for an AST file.
llvm-svn: 304756
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 2de8f06e712..15c2bec93c3 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -543,6 +543,8 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, // Options relating to how we treat the input (but not what we do with it) // are inherited from the AST unit. + CI.getHeaderSearchOpts() = AST->getHeaderSearchOpts(); + CI.getPreprocessorOpts() = AST->getPreprocessorOpts(); CI.getLangOpts() = AST->getLangOpts(); // Preload all the module files loaded transitively by the AST unit. @@ -552,6 +554,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, if (&MF != &MM.getPrimaryModule()) CI.getFrontendOpts().ModuleFiles.push_back(MF.FileName); } + // FIXME: Preload module maps loaded by the AST unit. // Set the shared objects, these are reset when we finish processing the // file, otherwise the CompilerInstance will happily destroy them. |