The @objc method argument bridging did the right thing but for
func to block thunks we didn't handle optionals and IUOs.
Symptoms included memory leaks because IRGen would later try to
retain the block by calling Block_copy() and discarding the result,
or memory corruption because the on-stack block could outlive
its stack frame.
Fixes <rdar://problem/22471309>.
Swift SVN r31882
This re-applies commit r31763 with a change to the predicate we
use for determining the linkage of a definition. It turns out we
could have definitions with a Clang body that were still public,
so instead of checking for a Clang body just check if the Clang
declaration is externally visible or not.
Swift SVN r31777
If an external SIL function has a Clang-generated body, I think this
means we have a static function, and we want to use Shared linkage,
not Public.
Add a new flag to SILFunction for this and plumb it through to
appease assertions from SILVerifier.
Swift SVN r31763
Specifically, introduce an ObjectiveC model written in Objective-C, and put the relevant, de-duplicated bits (such as NSObject) there. Use -I %S/Inputs -enable-source-import wherever we need to use this bridging SDK.
Swift SVN r17836