diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-30 00:36:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-30 00:36:36 +0000 |
commit | 3d3589db579f7695667b913c5043dd264ebe546f (patch) | |
tree | 6b0b95eaeefc38ddb85a1086076867f91e2e1b7f /include/clang/Lex/ModuleLoader.h | |
parent | d5a3b7804f1594c9f21c7f2cee0920a66feeb93a (diff) |
Switch the module-loading interfaces and parser from a simple
top-level module name to a module path (e.g., std.vector). We're still
missing a number of pieces for this actually to do something.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/ModuleLoader.h')
-rw-r--r-- | include/clang/Lex/ModuleLoader.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/clang/Lex/ModuleLoader.h b/include/clang/Lex/ModuleLoader.h index 72ec0e3ebc..42071080f7 100644 --- a/include/clang/Lex/ModuleLoader.h +++ b/include/clang/Lex/ModuleLoader.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_LEX_MODULE_LOADER_H #include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/ArrayRef.h" namespace clang { @@ -24,6 +25,10 @@ class IdentifierInfo; /// interpreted by the module loader itself. typedef void *ModuleKey; +/// \brief A sequence of identifier/location pairs used to describe a particular +/// module or submodule, e.g., std.vector. +typedef llvm::ArrayRef<std::pair<IdentifierInfo*, SourceLocation> > ModuleIdPath; + /// \brief Abstract interface for a module loader. /// /// This abstract interface describes a module loader, which is responsible @@ -39,15 +44,13 @@ public: /// parameters. /// /// \param ImportLoc The location of the 'import' keyword. - /// \param ModuleName The name of the module to be loaded. - /// \param ModuleNameLoc The location of the module name. + /// \param Path The identifiers (and their locations) of the module + /// "path", e.g., "std.vector" would be split into "std" and "vector". /// /// \returns If successful, a non-NULL module key describing this module. /// Otherwise, returns NULL to indicate that the module could not be /// loaded. - virtual ModuleKey loadModule(SourceLocation ImportLoc, - IdentifierInfo &ModuleName, - SourceLocation ModuleNameLoc) = 0; + virtual ModuleKey loadModule(SourceLocation ImportLoc, ModuleIdPath Path) = 0; }; } |