diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-08-09 00:57:23 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-08-09 00:57:23 +0000 |
commit | 9d6448b1370ad67afcdcf90699f9ffddf2d582a9 (patch) | |
tree | 3e1e589597c0444135260451b25d397ca391343b /clang/lib/Frontend/CompilerInstance.cpp | |
parent | ffbabb792532c7af61335347a30a7c657aac6c0a (diff) | |
download | bcm5719-llvm-9d6448b1370ad67afcdcf90699f9ffddf2d582a9.tar.gz bcm5719-llvm-9d6448b1370ad67afcdcf90699f9ffddf2d582a9.zip |
Refactor the module map file used for uniquing a module name out of
class Module. It's almost always going to be the same as
getContainingModule() for top-level modules, so just add a map to cover
the remaining cases. This lets us do less bookkeeping to keep the
ModuleMap fields up to date.
llvm-svn: 215268
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 4a75058e6af..22788aa5fb0 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -958,9 +958,10 @@ static bool compileModuleImpl(CompilerInstance &ImportingInstance, SourceMgr.overrideFileContents(ModuleMapFile, ModuleMapBuffer); } - // Construct a module-generating action. Passing through Module->ModuleMap is + // Construct a module-generating action. Passing through the module map is // safe because the FileManager is shared between the compiler instances. - GenerateModuleAction CreateModuleAction(Module->ModuleMap, Module->IsSystem); + GenerateModuleAction CreateModuleAction( + ModMap.getModuleMapFileForUniquing(Module), Module->IsSystem); // Execute the action to actually build the module in-place. Use a separate // thread so that we get a stack large enough. |