From 1a4761edca58c6b559de825b9abfb66f7f1ba94a Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 30 Nov 2011 23:21:26 +0000 Subject: Promote ModuleMap::Module to a namespace-scope class in the Basic library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145538 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInstance.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/Frontend/CompilerInstance.cpp') diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index c92d32ac7e..743a447c32 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -962,7 +962,7 @@ void LockFileManager::waitForUnlock() { /// \brief Compile a module file for the given module, using the options /// provided by the importing compiler instance. static void compileModule(CompilerInstance &ImportingInstance, - ModuleMap::Module *Module, + Module *Module, StringRef ModuleFileName) { LockFileManager Locked(ModuleFileName); switch (Locked) { @@ -1068,8 +1068,8 @@ static void compileModule(CompilerInstance &ImportingInstance, llvm::sys::Path(TempModuleMapFileName).eraseFromDisk(); } -ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, - ModuleIdPath Path) { +Module *CompilerInstance::loadModule(SourceLocation ImportLoc, + ModuleIdPath Path) { // If we've already handled this import, just return the cached result. // This one-element cache is important to eliminate redundant diagnostics // when both the preprocessor and parser see the same import declaration. @@ -1087,11 +1087,11 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, StringRef ModuleName = Path[0].first->getName(); SourceLocation ModuleNameLoc = Path[0].second; - ModuleMap::Module *Module = 0; + clang::Module *Module = 0; const FileEntry *ModuleFile = 0; // If we don't already have information on this module, load the module now. - llvm::DenseMap::iterator Known + llvm::DenseMap::iterator Known = KnownModules.find(Path[0].first); if (Known == KnownModules.end()) { // Search for a module with the given name. @@ -1206,7 +1206,7 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, if (Path.size() > 1) { for (unsigned I = 1, N = Path.size(); I != N; ++I) { StringRef Name = Path[I].first->getName(); - llvm::StringMap::iterator Pos + llvm::StringMap::iterator Pos = Module->SubModules.find(Name); if (Pos == Module->SubModules.end()) { @@ -1214,7 +1214,7 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, llvm::SmallVector Best; unsigned BestEditDistance = (std::numeric_limits::max)(); - for (llvm::StringMap::iterator + for (llvm::StringMap::iterator J = Module->SubModules.begin(), JEnd = Module->SubModules.end(); J != JEnd; ++J) { -- cgit v1.2.3-18-g5258