]> granicus.if.org Git - clang/commitdiff
Fix return type for calls to objc_setProperty.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 3 Feb 2009 23:43:59 +0000 (23:43 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 3 Feb 2009 23:43:59 +0000 (23:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63683 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjC.cpp

index 3ebee12f0df56b3ace544b54c87476a1aba16ece..ef4cf04073d182a2a14dd7cfa916c0745840c000 100644 (file)
@@ -183,6 +183,8 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP,
     Args.push_back(std::make_pair(RValue::get(CmdVal), Cmd->getType()));
     Args.push_back(std::make_pair(RValue::get(Offset), getContext().LongTy));
     Args.push_back(std::make_pair(RValue::get(True), getContext().BoolTy));
+    // FIXME: We shouldn't need to get the function info here, the
+    // runtime already should have computed it to build the function.
     RValue RV = EmitCall(Types.getFunctionInfo(PD->getType(), Args), 
                          GetPropertyFn, Args);
     // We need to fix the type here. Ivars with copy & retain are
@@ -269,7 +271,9 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP,
                                   getContext().BoolTy));
     Args.push_back(std::make_pair(RValue::get(IsCopy ? True : False), 
                                   getContext().BoolTy));
-    EmitCall(Types.getFunctionInfo(PD->getType(), Args), 
+    // FIXME: We shouldn't need to get the function info here, the
+    // runtime already should have computed it to build the function.
+    EmitCall(Types.getFunctionInfo(getContext().VoidTy, Args), 
              SetPropertyFn, Args);
   } else {
     SourceLocation Loc = PD->getLocation();