[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
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 @@
   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 @@
     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 @@
       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;