summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Serialization/ModuleManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Serialization/ModuleManager.h')
-rw-r--r--clang/include/clang/Serialization/ModuleManager.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/clang/include/clang/Serialization/ModuleManager.h b/clang/include/clang/Serialization/ModuleManager.h
index 3d10fad0a1b..d20c7e2fbbb 100644
--- a/clang/include/clang/Serialization/ModuleManager.h
+++ b/clang/include/clang/Serialization/ModuleManager.h
@@ -35,7 +35,13 @@ class ModuleManager {
/// \brief All loaded modules, indexed by name.
llvm::DenseMap<const FileEntry *, ModuleFile *> Modules;
-
+
+ typedef llvm::SetVector<const FileEntry *> AdditionalKnownModuleFileSet;
+
+ /// \brief Additional module files that are known but not loaded. Tracked
+ /// here so that we can re-export them if necessary.
+ AdditionalKnownModuleFileSet AdditionalKnownModuleFiles;
+
/// \brief FileManager that handles translating between filenames and
/// FileEntry *.
FileManager &FileMgr;
@@ -219,6 +225,19 @@ public:
/// has been "accepted", and will not (can not) be unloaded.
void moduleFileAccepted(ModuleFile *MF);
+ /// \brief Notification from the frontend that the given module file is
+ /// part of this compilation (even if not imported) and, if this compilation
+ /// is exported, should be made available to importers of it.
+ bool addKnownModuleFile(StringRef FileName);
+
+ /// \brief Get a list of additional module files that are not currently
+ /// loaded but are considered to be part of the current compilation.
+ llvm::iterator_range<AdditionalKnownModuleFileSet::const_iterator>
+ getAdditionalKnownModuleFiles() {
+ return llvm::make_range(AdditionalKnownModuleFiles.begin(),
+ AdditionalKnownModuleFiles.end());
+ }
+
/// \brief Visit each of the modules.
///
/// This routine visits each of the modules, starting with the
OpenPOWER on IntegriCloud