mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
This commit is contained in:
@@ -1536,7 +1536,7 @@ namespace {
|
||||
outs << 'T';
|
||||
|
||||
std::string typeEnc;
|
||||
getObjCEncodingForPropertyType(IGM, propTy, typeEnc);
|
||||
getObjCEncodingForPropertyType(IGM, prop, typeEnc);
|
||||
outs << typeEnc;
|
||||
|
||||
// Emit other attributes.
|
||||
|
||||
Reference in New Issue
Block a user