mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Skip weak linking on Windows consistently.
Always special-case Windows targets in `isAlwaysWeakImported()` instead of limiting the special case to declarations that are marked unavailable.
This commit is contained in:
@@ -1525,12 +1525,15 @@ bool Decl::isAlwaysWeakImported() const {
|
||||
return clangDecl->isWeakImported(
|
||||
getASTContext().LangOpts.getMinPlatformVersion());
|
||||
|
||||
// FIXME: Weak linking on Windows is not yet supported
|
||||
// https://github.com/apple/swift/issues/53303
|
||||
if (getASTContext().LangOpts.Target.isOSWindows())
|
||||
return false;
|
||||
|
||||
if (getAttrs().hasAttribute<WeakLinkedAttr>())
|
||||
return true;
|
||||
|
||||
// FIXME: Weak linking on Windows is not yet supported
|
||||
// https://github.com/apple/swift/issues/53303
|
||||
if (isUnavailable() && !getASTContext().LangOpts.Target.isOSWindows())
|
||||
if (isUnavailable())
|
||||
return true;
|
||||
|
||||
if (auto *accessor = dyn_cast<AccessorDecl>(this))
|
||||
|
||||
Reference in New Issue
Block a user