IRGen: Map SIL metatypes back to ObjC classes.

For ObjC class method calls, map a metatype value back to an objc Class before emitting the ObjC call. This is dumb because we already map the original Class to a Swift metatype when we map the metatype instruction, but it gets ObjC class method calls working. Now that SIL keeps use chains, we could be easily smarter about this.

Swift SVN r4558
This commit is contained in:
Joe Groff
2013-03-30 23:40:35 +00:00
parent d6b30f71f0
commit 0034475514
3 changed files with 16 additions and 7 deletions

View File

@@ -602,6 +602,7 @@ void IRGenSILFunction::visitApplyInst(swift::ApplyInst *i) {
addObjCMethodCallImplicitArguments(*this, emission,
calleeLV.getObjCMethod().getMethodDecl(),
selfArg.claimNext(),
thisValue.getType().getSwiftType(),
calleeLV.getObjCMethod().getSuperSearchType());
arg = 1;