aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-15 18:57:22 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-15 18:57:22 +0000
commit2ec293677806fddc4dffbc89e0f4faa5c49c2ddf (patch)
treeeb3608bb86093465a63562ffef0be04aa1bba25f /clang/lib/Frontend/CompilerInstance.cpp
parent933c9889aa4f680d8e983d05313eaca6e450a8c4 (diff)
downloadllvm-2ec293677806fddc4dffbc89e0f4faa5c49c2ddf.zip
llvm-2ec293677806fddc4dffbc89e0f4faa5c49c2ddf.tar.gz
llvm-2ec293677806fddc4dffbc89e0f4faa5c49c2ddf.tar.bz2
[modules] Setup the import location of a module file and use it
as the include location of the main file of an imported module. llvm-svn: 168061
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 22a74fc..8282a9c 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/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;