diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /include/clang/Lex/ModuleMap.h | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
Notes
Diffstat (limited to 'include/clang/Lex/ModuleMap.h')
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index aa519891c1ce8..a38c8d7819db4 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -45,6 +45,8 @@ class SourceManager; /// A mechanism to observe the actions of the module map parser as it /// reads module map files. class ModuleMapCallbacks { + virtual void anchor(); + public: virtual ~ModuleMapCallbacks() = default; @@ -92,9 +94,9 @@ class ModuleMap { /// named LangOpts::CurrentModule, if we've loaded it). Module *SourceModule = nullptr; - /// The global module for the current TU, if we still own it. (Ownership is - /// transferred if/when we create an enclosing module. - std::unique_ptr<Module> PendingGlobalModule; + /// Submodules of the current module that have not yet been attached to it. + /// (Ownership is transferred if/when we create an enclosing module.) + llvm::SmallVector<std::unique_ptr<Module>, 8> PendingSubmodules; /// The top-level modules that are known. llvm::StringMap<Module *> Modules; @@ -519,8 +521,7 @@ public: bool IsFramework, bool IsExplicit); - /// Create a 'global module' for a C++ Modules TS module interface - /// unit. + /// Create a 'global module' for a C++ Modules TS module interface unit. /// /// We model the global module as a submodule of the module interface unit. /// Unfortunately, we can't create the module interface unit's Module until @@ -537,6 +538,9 @@ public: Module *createModuleForInterfaceUnit(SourceLocation Loc, StringRef Name, Module *GlobalModule); + /// Create a header module from the specified list of headers. + Module *createHeaderModule(StringRef Name, ArrayRef<Module::Header> Headers); + /// Infer the contents of a framework module map from the given /// framework directory. Module *inferFrameworkModule(const DirectoryEntry *FrameworkDir, @@ -580,7 +584,7 @@ public: /// getContainingModuleMapFile(). const FileEntry *getModuleMapFileForUniquing(const Module *M) const; - void setInferredModuleAllowedBy(Module *M, const FileEntry *ModuleMap); + void setInferredModuleAllowedBy(Module *M, const FileEntry *ModMap); /// Get any module map files other than getModuleMapFileForUniquing(M) /// that define submodules of a top-level module \p M. This is cheaper than |