mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add the ability to lookup/link a SILFunction in the SILModule by its mangled name.
This feature is required for the implementation of pre-specialization, because one needs to check if a specialized SIL function with a given name exists in the standard library. Swift SVN r30307
This commit is contained in:
@@ -502,6 +502,12 @@ bool SILModule::linkFunction(SILDeclRef Decl, SILModule::LinkingMode Mode,
|
||||
ExternalSource, Callback).processDeclRef(Decl);
|
||||
}
|
||||
|
||||
bool SILModule::linkFunction(StringRef Name, SILModule::LinkingMode Mode,
|
||||
std::function<void(SILFunction *)> Callback) {
|
||||
return SILLinkerVisitor(*this, getSILLoader(), Mode,
|
||||
ExternalSource, Callback).processFunction(Name);
|
||||
}
|
||||
|
||||
void SILModule::linkAllWitnessTables() {
|
||||
getSILLoader()->getAllWitnessTables();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user