mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add @_weakLinked and a corresponding SIL attribute
This is mostly intended to be used for testing at this point; in the long run, we want to be using availability information to decide whether to weak-link something or not. You'll notice a bunch of FIXMEs in the test case that we may not need now, but will probably need to handle in the future. Groundwork for doing backward-deployment execution tests.
This commit is contained in:
@@ -310,6 +310,9 @@ static void addFunctionAttributes(SILFunction *F, DeclAttributes &Attrs,
|
||||
if (Attrs.hasAttribute<SILGenNameAttr>() ||
|
||||
Attrs.hasAttribute<CDeclAttr>())
|
||||
F->setHasCReferences(true);
|
||||
|
||||
if (Attrs.hasAttribute<WeakLinkedAttr>())
|
||||
F->setWeakLinked();
|
||||
}
|
||||
|
||||
SILFunction *SILModule::getOrCreateFunction(SILLocation loc,
|
||||
|
||||
Reference in New Issue
Block a user