aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend
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
commit1a4761edca58c6b559de825b9abfb66f7f1ba94a (patch)
treebd17d1a3341870f9378db26a09045b3bb2db8426 /include/clang/Frontend
parent8d39c3ddfc17d9e768a17eb0ce9f11c33bf9d50a (diff)
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
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r--include/clang/Frontend/ASTUnit.h2
-rw-r--r--include/clang/Frontend/CompilerInstance.h8
-rw-r--r--include/clang/Frontend/FrontendActions.h5
3 files changed, 8 insertions, 7 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h
index c29b07440f..4cab303ba4 100644
--- a/include/clang/Frontend/ASTUnit.h
+++ b/include/clang/Frontend/ASTUnit.h
@@ -781,7 +781,7 @@ public:
/// \returns True if an error occurred, false otherwise.
bool serialize(raw_ostream &OS);
- virtual ModuleKey loadModule(SourceLocation ImportLoc, ModuleIdPath Path) {
+ virtual Module *loadModule(SourceLocation ImportLoc, ModuleIdPath Path) {
// ASTUnit doesn't know how to load modules (not that this matters).
return 0;
}
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h
index 90f84ef379..9cd09ee10c 100644
--- a/include/clang/Frontend/CompilerInstance.h
+++ b/include/clang/Frontend/CompilerInstance.h
@@ -12,7 +12,6 @@
#include "clang/Frontend/CompilerInvocation.h"
#include "clang/Lex/ModuleLoader.h"
-#include "clang/Lex/ModuleMap.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
@@ -39,6 +38,7 @@ class ExternalASTSource;
class FileEntry;
class FileManager;
class FrontendAction;
+class Module;
class Preprocessor;
class Sema;
class SourceManager;
@@ -101,7 +101,7 @@ class CompilerInstance : public ModuleLoader {
/// \brief The set of top-level modules that has already been loaded,
/// along with the module map
- llvm::DenseMap<const IdentifierInfo *, ModuleMap::Module *> KnownModules;
+ llvm::DenseMap<const IdentifierInfo *, Module *> KnownModules;
/// \brief The location of the module-import keyword for the last module
/// import.
@@ -109,7 +109,7 @@ class CompilerInstance : public ModuleLoader {
/// \brief The result of the last module import.
///
- ModuleMap::Module *LastModuleImportResult;
+ Module *LastModuleImportResult;
/// \brief Holds information about the output file.
///
@@ -641,7 +641,7 @@ public:
/// }
- virtual ModuleKey loadModule(SourceLocation ImportLoc, ModuleIdPath Path);
+ virtual Module *loadModule(SourceLocation ImportLoc, ModuleIdPath Path);
};
} // end namespace clang
diff --git a/include/clang/Frontend/FrontendActions.h b/include/clang/Frontend/FrontendActions.h
index bf071b3a51..c0ed9fa410 100644
--- a/include/clang/Frontend/FrontendActions.h
+++ b/include/clang/Frontend/FrontendActions.h
@@ -11,12 +11,13 @@
#define LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H
#include "clang/Frontend/FrontendAction.h"
-#include "clang/Lex/ModuleMap.h"
#include <string>
#include <vector>
namespace clang {
+class Module;
+
//===----------------------------------------------------------------------===//
// Custom Consumer Actions
//===----------------------------------------------------------------------===//
@@ -93,7 +94,7 @@ public:
};
class GenerateModuleAction : public ASTFrontendAction {
- ModuleMap::Module *Module;
+ Module *Module;
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,