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:
Jordan Rose
2018-02-20 17:55:31 -08:00
parent a036033f9a
commit bb339778b4
18 changed files with 353 additions and 19 deletions

View File

@@ -98,7 +98,7 @@ SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage, StringRef Name,
Serialized(isSerialized), Thunk(isThunk),
ClassSubclassScope(unsigned(classSubclassScope)), GlobalInitFlag(false),
InlineStrategy(inlineStrategy), Linkage(unsigned(Linkage)),
HasCReferences(false),
HasCReferences(false), IsWeakLinked(false),
OptMode(OptimizationMode::NotSet), EffectsKindAttr(E),
EntryCount(entryCount) {
if (InsertBefore)