[cfe-commits] r132258 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
David Chisnall
csdavec at swan.ac.uk
Sat May 28 07:09:01 PDT 2011
Author: theraven
Date: Sat May 28 09:09:01 2011
New Revision: 132258
URL: http://llvm.org/viewvc/llvm-project?rev=132258&view=rev
Log:
Fix missing cast.
Modified:
cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=132258&r1=132257&r2=132258&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Sat May 28 09:09:01 2011
@@ -956,16 +956,17 @@
bool IsClassMessage,
const CallArgList &CallArgs,
const ObjCMethodDecl *Method) {
+ CGBuilderTy &Builder = CGF.Builder;
if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) {
if (Sel == RetainSel || Sel == AutoreleaseSel) {
- return RValue::get(Receiver);
+ return RValue::get(EnforceType(Builder, Receiver,
+ CGM.getTypes().ConvertType(ResultType)));
}
if (Sel == ReleaseSel) {
return RValue::get(0);
}
}
- CGBuilderTy &Builder = CGF.Builder;
llvm::Value *cmd = GetSelector(Builder, Sel);
@@ -1063,18 +1064,19 @@
const CallArgList &CallArgs,
const ObjCInterfaceDecl *Class,
const ObjCMethodDecl *Method) {
+ CGBuilderTy &Builder = CGF.Builder;
+
// Strip out message sends to retain / release in GC mode
if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) {
if (Sel == RetainSel || Sel == AutoreleaseSel) {
- return RValue::get(Receiver);
+ return RValue::get(EnforceType(Builder, Receiver,
+ CGM.getTypes().ConvertType(ResultType)));
}
if (Sel == ReleaseSel) {
return RValue::get(0);
}
}
- CGBuilderTy &Builder = CGF.Builder;
-
// If the return type is something that goes in an integer register, the
// runtime will handle 0 returns. For other cases, we fill in the 0 value
// ourselves.
More information about the cfe-commits
mailing list