mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[AST] Intro a check for the export_as relationship between 2 modules
This commit is contained in:
@@ -2175,6 +2175,14 @@ const clang::Module *ModuleDecl::findUnderlyingClangModule() const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool ModuleDecl::isExportedAs(const ModuleDecl *other) const {
|
||||
auto clangModule = findUnderlyingClangModule();
|
||||
if (!clangModule)
|
||||
return false;
|
||||
|
||||
return other->getRealName().str() == clangModule->ExportAsModule;
|
||||
}
|
||||
|
||||
void ModuleDecl::collectBasicSourceFileInfo(
|
||||
llvm::function_ref<void(const BasicSourceFileInfo &)> callback) const {
|
||||
for (const FileUnit *fileUnit : getFiles()) {
|
||||
|
||||
Reference in New Issue
Block a user