summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-29 01:06:04 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-29 01:06:04 +0000
commit43af5132c51d1dc592132488d1d8afe79057897c (patch)
tree26de14612e894cdec7e218b4ece40e64c5b8ad8f /clang/lib
parent051b4432429c869a3505eaa74cb3cd4802ae8909 (diff)
downloadbcm5719-llvm-43af5132c51d1dc592132488d1d8afe79057897c.tar.gz
bcm5719-llvm-43af5132c51d1dc592132488d1d8afe79057897c.zip
In the Module class, add a reference to the corresponding AST file.
llvm-svn: 164873
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Basic/Module.cpp4
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index 634884074e1..91b6207b55a 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -23,8 +23,8 @@ using namespace clang;
Module::Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent,
bool IsFramework, bool IsExplicit)
- : Name(Name), DefinitionLoc(DefinitionLoc), Parent(Parent),
- Umbrella(), IsAvailable(true), IsFromModuleFile(false),
+ : Name(Name), DefinitionLoc(DefinitionLoc), Parent(Parent),
+ Umbrella(), ASTFile(0), IsAvailable(true), IsFromModuleFile(false),
IsFramework(IsFramework), IsExplicit(IsExplicit), IsSystem(false),
InferSubmodules(false), InferExplicitSubmodules(false),
InferExportWildcard(false), NameVisibility(Hidden)
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 6de153107f3..4cc46b8ab74 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -980,6 +980,9 @@ Module *CompilerInstance::loadModule(SourceLocation ImportLoc,
Module = PP->getHeaderSearchInfo().getModuleMap()
.findModule((Path[0].first->getName()));
}
+
+ if (Module)
+ Module->setASTFile(ModuleFile);
// Cache the result of this top-level module lookup for later.
Known = KnownModules.insert(std::make_pair(Path[0].first, Module)).first;
OpenPOWER on IntegriCloud