[cfe-commits] r76959 - in /cfe/trunk/lib/CodeGen: CGObjCGNU.cpp CGObjCMac.cpp
Daniel Dunbar
daniel at zuster.org
Fri Jul 24 00:40:28 PDT 2009
Author: ddunbar
Date: Fri Jul 24 02:40:24 2009
New Revision: 76959
URL: http://llvm.org/viewvc/llvm-project?rev=76959&view=rev
Log:
Fix declaration of obc_enumerationMutation function, for GNU runtime.
Modified:
cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=76959&r1=76958&r2=76959&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Fri Jul 24 02:40:24 2009
@@ -142,7 +142,7 @@
virtual llvm::Function *ModuleInitFunction();
virtual llvm::Function *GetPropertyGetFunction();
virtual llvm::Function *GetPropertySetFunction();
- virtual llvm::Function *EnumerationMutationFunction();
+ virtual llvm::Constant *EnumerationMutationFunction();
virtual void EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
const Stmt &S);
@@ -1243,11 +1243,15 @@
"objc_setProperty"));
}
-llvm::Function *CGObjCGNU::EnumerationMutationFunction() {
- std::vector<const llvm::Type*> Params(1, IdTy);
- return cast<llvm::Function>(CGM.CreateRuntimeFunction(
- VMContext.getFunctionType(llvm::Type::VoidTy, Params, true),
- "objc_enumerationMutation"));
+llvm::Constant *CGObjCGNU::EnumerationMutationFunction() {
+ CodeGen::CodeGenTypes &Types = CGM.getTypes();
+ ASTContext &Ctx = CGM.getContext();
+ // void objc_enumerationMutation (id)
+ llvm::SmallVector<QualType,16> Params;
+ Params.push_back(Ctx.getObjCIdType());
+ const llvm::FunctionType *FTy =
+ Types.GetFunctionType(Types.getFunctionInfo(Ctx.VoidTy, Params), false);
+ return CGM.CreateRuntimeFunction(FTy, "objc_enumerationMutation");
}
void CGObjCGNU::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=76959&r1=76958&r2=76959&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Fri Jul 24 02:40:24 2009
@@ -325,8 +325,7 @@
ASTContext &Ctx = CGM.getContext();
// void objc_enumerationMutation (id)
llvm::SmallVector<QualType,16> Params;
- QualType IdType = Ctx.getObjCIdType();
- Params.push_back(IdType);
+ Params.push_back(Ctx.getObjCIdType());
const llvm::FunctionType *FTy =
Types.GetFunctionType(Types.getFunctionInfo(Ctx.VoidTy, Params), false);
return CGM.CreateRuntimeFunction(FTy, "objc_enumerationMutation");
More information about the cfe-commits
mailing list