mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Modify clang declaration weakly-imported query to use Swift's code-gen target triple
Similarly to how https://github.com/swiftlang/swift/pull/70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
This commit is contained in:
@@ -618,7 +618,8 @@ bool SILFunction::isWeakImported(ModuleDecl *module) const {
|
||||
|
||||
// For imported functions check the Clang declaration.
|
||||
if (ClangNodeOwner)
|
||||
return ClangNodeOwner->getClangDecl()->isWeakImported();
|
||||
return ClangNodeOwner->getClangDecl()->isWeakImported(
|
||||
getASTContext().LangOpts.getMinPlatformVersion());
|
||||
|
||||
// For native functions check a flag on the SILFunction
|
||||
// itself.
|
||||
|
||||
Reference in New Issue
Block a user