/// The global module fragment of the current translation unit.
clang::Module *GlobalModuleFragment = nullptr;
- /// The modules we imported directly.
- llvm::SmallPtrSet<clang::Module *, 8> DirectModuleImports;
-
/// Namespace definitions that we will export when they finish.
llvm::SmallPtrSet<const NamespaceDecl*, 8> DeferredExportedNamespaces;
return Entity->getOwningModule();
}
- bool isModuleDirectlyImported(const Module *M) {
- return DirectModuleImports.contains(M);
- }
-
// Determine whether the module M belongs to the current TU.
bool isModuleUnitOfCurrentTU(const Module *M) const;
Diag(ExportLoc, diag::err_export_not_in_module_interface);
}
- // In some cases we need to know if an entity was present in a directly-
- // imported module (as opposed to a transitive import). This avoids
- // searching both Imports and Exports.
- DirectModuleImports.insert(Mod);
-
return Import;
}