diff options
author | John McCall <rjmccall@apple.com> | 2010-05-17 20:12:43 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-05-17 20:12:43 +0000 |
commit | 3e294929b87ac48eb23a5f9422cf535f4fa35edd (patch) | |
tree | 527a451fe58da7eaee0152210ec74e1288493429 /clang/lib/CodeGen | |
parent | 0211a969891b4bc035eb19d01baa071e5e2a213e (diff) | |
download | bcm5719-llvm-3e294929b87ac48eb23a5f9422cf535f4fa35edd.tar.gz bcm5719-llvm-3e294929b87ac48eb23a5f9422cf535f4fa35edd.zip |
Correctly generate IR for ObjC messages sends to protocol-qualified types.
Fixes rdar://problem/7992749
llvm-svn: 103965
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index ce048405afe..9943a3b7007 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -64,10 +64,11 @@ RValue CodeGenFunction::EmitObjCMessageExpr(const ObjCMessageExpr *E) { break; case ObjCMessageExpr::Class: { - const ObjCInterfaceType *IFace - = E->getClassReceiver()->getAs<ObjCInterfaceType>(); - assert(IFace && "Invalid Objective-C class message send"); - OID = IFace->getDecl(); + const ObjCObjectType *ObjTy + = E->getClassReceiver()->getAs<ObjCObjectType>(); + assert(ObjTy && "Invalid Objective-C class message send"); + OID = ObjTy->getInterface(); + assert(OID && "Invalid Objective-C class message send"); Receiver = Runtime.GetClass(Builder, OID); isClassMessage = true; break; |