diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-11-15 18:57:22 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-11-15 18:57:22 +0000 |
commit | 958bcaf3d4e0c1ae46de3e84e7c2a7638c3c5286 (patch) | |
tree | 06acea85709186f96a465759b27b9f59526820a3 /lib/Frontend/CompilerInstance.cpp | |
parent | b164af6ae6f2338cc8e685740960715858bfa134 (diff) |
[modules] Setup the import location of a module file and use it
as the include location of the main file of an imported module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 22a74fcc35..8282a9c9c3 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -342,6 +342,7 @@ CompilerInstance::createPCHExternalASTSource(StringRef Path, switch (Reader->ReadAST(Path, Preamble ? serialization::MK_Preamble : serialization::MK_PCH, + SourceLocation(), ASTReader::ARR_None)) { case ASTReader::Success: // Set the predefines buffer as suggested by the PCH reader. Typically, the @@ -989,7 +990,7 @@ Module *CompilerInstance::loadModule(SourceLocation ImportLoc, if (Module) ARRFlags |= ASTReader::ARR_OutOfDate; switch (ModuleManager->ReadAST(ModuleFile->getName(), - serialization::MK_Module, + serialization::MK_Module, ImportLoc, ARRFlags)) { case ASTReader::Success: break; @@ -1005,7 +1006,7 @@ Module *CompilerInstance::loadModule(SourceLocation ImportLoc, ModuleFile = FileMgr->getFile(ModuleFileName); if (!ModuleFile || ModuleManager->ReadAST(ModuleFileName, - serialization::MK_Module, + serialization::MK_Module, ImportLoc, ASTReader::ARR_None) != ASTReader::Success) { KnownModules[Path[0].first] = 0; return 0; |