diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-29 02:19:42 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-06-29 02:19:42 +0000 |
commit | f3f846162a5d6b5b84ed7d146a29dc175542c2c0 (patch) | |
tree | 77f0444b71827ec27ffb22111c45685d1bc4ea6f /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 72c24da063ec5fbebbf5b844cbe700c868bb5dba (diff) | |
download | bcm5719-llvm-f3f846162a5d6b5b84ed7d146a29dc175542c2c0.tar.gz bcm5719-llvm-f3f846162a5d6b5b84ed7d146a29dc175542c2c0.zip |
Track the set of module maps read while building a .pcm file and reload those when preprocessing from that .pcm file.
llvm-svn: 306628
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index e5da2ae4f22..3b5335478db 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -825,8 +825,11 @@ bool CompilerInstance::InitializeSourceManager( const FrontendInputFile &Input, DiagnosticsEngine &Diags, FileManager &FileMgr, SourceManager &SourceMgr, HeaderSearch *HS, DependencyOutputOptions &DepOpts, const FrontendOptions &Opts) { - SrcMgr::CharacteristicKind - Kind = Input.isSystem() ? SrcMgr::C_System : SrcMgr::C_User; + SrcMgr::CharacteristicKind Kind = + Input.getKind().getFormat() == InputKind::ModuleMap + ? Input.isSystem() ? SrcMgr::C_System_ModuleMap + : SrcMgr::C_User_ModuleMap + : Input.isSystem() ? SrcMgr::C_System : SrcMgr::C_User; if (Input.isBuffer()) { SourceMgr.setMainFileID(SourceMgr.createFileID( |