mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[sil-linker] Improve the implementation of the hasSILFunction API
It it now possible to check if a function with a given name and a given linkage exists in one of the modules, even if the current module contains a function with this name but a difference linkage. This is useful e.g. for performing a lookup of pre-specializations.
This commit is contained in:
@@ -139,6 +139,10 @@ SILFunction *SILLinkerVisitor::lookupFunction(StringRef Name,
|
||||
return NewFn;
|
||||
}
|
||||
|
||||
/// Process Decl, recursively deserializing any thing Decl may reference.
|
||||
bool SILLinkerVisitor::hasFunction(StringRef Name, SILLinkage Linkage) {
|
||||
return Loader->hasSILFunction(Name, Linkage);
|
||||
}
|
||||
|
||||
/// Deserialize the VTable mapped to C if it exists and all SIL the VTable
|
||||
/// transitively references.
|
||||
|
||||
Reference in New Issue
Block a user