Commits

John McCall committed 73258f2b212
Generate method/property @encodings from the foreign SILFunctionType of the method instead of its formal type. Gives more accurate information to the @encoding, makes foreign error conventions work implicitly, and allows IRGen's Swift-to-Clang to avoid duplicating arbitrary amounts of the bridging logic from SILGen. Some finagling was required in order to avoid calling getConstantFunctionType from within other kinds of lowering, which might have re-entered a generic context. Also required fixing a bug with the type lowering of optional DynamicSelfTypes where we would end up with a substituted type in the lowered type. Also, for some reason, our @encoding for -dealloc methods was pretending that there was a formal parameter. There didn't seem to be any justification for this, and it's not like Clang does that. Fixed. This commit reapplies r29266 with a conservative build fix that disables ObjC property descriptors for @objc properties that lack a getter. That should only be possible in SIL files, because @objc should force accessors to be synthesized. Arguably, Sema shouldn't be marking things implicitly @objc in SIL files, but I'll leave that decision open for now. Swift SVN r29272