From 0e4f40e1bbc4dce16bbb9870300a435419f1b3d5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 17 Apr 2009 00:48:04 +0000 Subject: Attributes on block functions were not being set. - clang not producing correct large struct return code for Blocks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69337 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index d1d67a11b8..7cb5e43cb5 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -340,14 +340,15 @@ void CodeGenModule::SetCommonAttributes(const Decl *D, GV->setSection(SA->getName()); } -void CodeGenModule::SetMethodAttributes(const ObjCMethodDecl *MD, - llvm::Function *F) { - SetLLVMFunctionAttributes(MD, getTypes().getFunctionInfo(MD), F); - SetLLVMFunctionAttributesForDefinition(MD, F); +void CodeGenModule::SetInternalFunctionAttributes(const Decl *D, + llvm::Function *F, + const CGFunctionInfo &FI) { + SetLLVMFunctionAttributes(D, FI, F); + SetLLVMFunctionAttributesForDefinition(D, F); F->setLinkage(llvm::Function::InternalLinkage); - SetCommonAttributes(MD, F); + SetCommonAttributes(D, F); } void CodeGenModule::SetFunctionAttributes(const FunctionDecl *FD, -- cgit v1.2.3