[cfe-dev] GNU runtime Protocol type fix
David Chisnall
csdavec at swansea.ac.uk
Tue Mar 31 06:26:09 PDT 2009
This patch fixes a type mismatch for protocols as method arguments.
David
Index: CGObjCGNU.cpp
===================================================================
--- CGObjCGNU.cpp (revision 68072)
+++ CGObjCGNU.cpp (working copy)
@@ -567,7 +567,10 @@
llvm::Value *CGObjCGNU::GenerateProtocolRef(CGBuilderTy &Builder,
const ObjCProtocolDecl
*PD) {
- return ExistingProtocols[PD->getNameAsString()];
+ llvm::Value *protocol = ExistingProtocols[PD->getNameAsString()];
+ const llvm::Type *T =
+ CGM.getTypes().ConvertType(CGM.getContext().getObjCProtoType());
+ return Builder.CreateBitCast(protocol,
llvm::PointerType::getUnqual(T));
}
void CGObjCGNU::GenerateProtocol(const ObjCProtocolDecl *PD) {
More information about the cfe-dev
mailing list