summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-09-15 01:21:15 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-09-15 01:21:15 +0000
commit84853833c24ba9c1b5196d4c556e353781b8d789 (patch)
tree9c8b0dac6d49a4523ed41b86d2404375d31a462c /include/clang/Lex
parent74afe0c6779c6ae024d076636230605f92675f39 (diff)
[modules] Frontend support for building a header module from a list of
headaer files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex')
-rw-r--r--include/clang/Lex/ModuleMap.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h
index 4a3984e746..4daa1dd817 100644
--- a/include/clang/Lex/ModuleMap.h
+++ b/include/clang/Lex/ModuleMap.h
@@ -92,9 +92,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 +519,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 +536,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,