Commits

John McCall committed ed68d261e7a
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. Swift SVN r29266