[SIL] [Immediate] Promote linkage of SILFunctions defining requested symbols

Promotes the linkage of `SILFunction`s defining requested symbols,
ensuring they are emitted during IRGen.
This commit is contained in:
Zak Kent
2023-08-15 17:36:59 -07:00
parent f82fa91de9
commit e276c79939
3 changed files with 22 additions and 5 deletions

View File

@@ -864,6 +864,14 @@ void SILModule::installSILRemarkStreamer() {
silRemarkStreamer = SILRemarkStreamer::create(*this);
}
void SILModule::promoteLinkages() {
for (auto &Fn : functions)
if (Fn.isDefinition())
Fn.setLinkage(SILLinkage::Public);
// TODO: Promote linkage of other SIL entities
}
bool SILModule::isStdlibModule() const {
return TheSwiftModule->isStdlibModule();
}