summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-30 23:21:26 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-30 23:21:26 +0000
commitde3ef502a97c428236427d6583384bb7c85a81fc (patch)
tree47c6097eb0dc70231eb8afde1005132aea7cf5a5 /clang/lib/Frontend/CompilerInstance.cpp
parent60e2c6aa433e6cbb3eb13377c9e8904209416267 (diff)
downloadbcm5719-llvm-de3ef502a97c428236427d6583384bb7c85a81fc.tar.gz
bcm5719-llvm-de3ef502a97c428236427d6583384bb7c85a81fc.zip
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). llvm-svn: 145538
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index c92d32ac7ef..743a447c323 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/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<const IdentifierInfo *, ModuleMap::Module *>::iterator Known
+ llvm::DenseMap<const IdentifierInfo *, clang::Module *>::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<ModuleMap::Module *>::iterator Pos
+ llvm::StringMap<clang::Module *>::iterator Pos
= Module->SubModules.find(Name);
if (Pos == Module->SubModules.end()) {
@@ -1214,7 +1214,7 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc,
llvm::SmallVector<StringRef, 2> Best;
unsigned BestEditDistance = (std::numeric_limits<unsigned>::max)();
- for (llvm::StringMap<ModuleMap::Module *>::iterator
+ for (llvm::StringMap<clang::Module *>::iterator
J = Module->SubModules.begin(),
JEnd = Module->SubModules.end();
J != JEnd; ++J) {
OpenPOWER on IntegriCloud