diff options
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index e174f8595ba..72828152472 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -1123,7 +1123,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, // Create the function declaration. const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType(); - const CGFunctionInfo &fnInfo = CGM.getTypes().arrangeFunctionDeclaration( + const CGFunctionInfo &fnInfo = CGM.getTypes().arrangeFreeFunctionDeclaration( fnType->getReturnType(), args, fnType->getExtInfo(), fnType->isVariadic()); if (CGM.ReturnTypeUsesSRet(fnInfo)) @@ -1284,10 +1284,8 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { ImplicitParamDecl srcDecl(0, SourceLocation(), 0, C.VoidPtrTy); args.push_back(&srcDecl); - const CGFunctionInfo &FI = - CGM.getTypes().arrangeFunctionDeclaration(C.VoidTy, args, - FunctionType::ExtInfo(), - /*variadic*/ false); + const CGFunctionInfo &FI = CGM.getTypes().arrangeFreeFunctionDeclaration( + C.VoidTy, args, FunctionType::ExtInfo(), /*variadic=*/false); // FIXME: it would be nice if these were mergeable with things with // identical semantics. @@ -1459,10 +1457,8 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { ImplicitParamDecl srcDecl(0, SourceLocation(), 0, C.VoidPtrTy); args.push_back(&srcDecl); - const CGFunctionInfo &FI = - CGM.getTypes().arrangeFunctionDeclaration(C.VoidTy, args, - FunctionType::ExtInfo(), - /*variadic*/ false); + const CGFunctionInfo &FI = CGM.getTypes().arrangeFreeFunctionDeclaration( + C.VoidTy, args, FunctionType::ExtInfo(), /*variadic=*/false); // FIXME: We'd like to put these into a mergable by content, with // internal linkage. @@ -1750,10 +1746,8 @@ generateByrefCopyHelper(CodeGenFunction &CGF, ImplicitParamDecl src(0, SourceLocation(), 0, Context.VoidPtrTy); args.push_back(&src); - const CGFunctionInfo &FI = - CGF.CGM.getTypes().arrangeFunctionDeclaration(R, args, - FunctionType::ExtInfo(), - /*variadic*/ false); + const CGFunctionInfo &FI = CGF.CGM.getTypes().arrangeFreeFunctionDeclaration( + R, args, FunctionType::ExtInfo(), /*variadic=*/false); CodeGenTypes &Types = CGF.CGM.getTypes(); llvm::FunctionType *LTy = Types.GetFunctionType(FI); @@ -1821,10 +1815,8 @@ generateByrefDisposeHelper(CodeGenFunction &CGF, ImplicitParamDecl src(0, SourceLocation(), 0, Context.VoidPtrTy); args.push_back(&src); - const CGFunctionInfo &FI = - CGF.CGM.getTypes().arrangeFunctionDeclaration(R, args, - FunctionType::ExtInfo(), - /*variadic*/ false); + const CGFunctionInfo &FI = CGF.CGM.getTypes().arrangeFreeFunctionDeclaration( + R, args, FunctionType::ExtInfo(), /*variadic=*/false); CodeGenTypes &Types = CGF.CGM.getTypes(); llvm::FunctionType *LTy = Types.GetFunctionType(FI); |