From 761d7f78e2dac7ea5f35828c2271e60d91e106ce Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 25 Sep 2008 21:02:23 +0000 Subject: Large mechanical patch. s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56623 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index c0863578e8..d237598e28 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -212,15 +212,15 @@ static void SetGlobalValueAttributes(const Decl *D, } } -void CodeGenModule::SetFunctionParamAttrs(const Decl *D, +void CodeGenModule::SetFunctionAttributes(const Decl *D, const CGFunctionInfo &Info, llvm::Function *F) { - ParamAttrListType ParamAttrList; - ConstructParamAttrList(D, Info.argtypes_begin(), Info.argtypes_end(), - ParamAttrList); + AttributeListType AttributeList; + ConstructAttributeList(D, Info.argtypes_begin(), Info.argtypes_end(), + AttributeList); - F->setParamAttrs(llvm::PAListPtr::get(ParamAttrList.begin(), - ParamAttrList.size())); + F->setAttributes(llvm::AttrListPtr::get(AttributeList.begin(), + AttributeList.size())); // Set the appropriate calling convention for the Function. if (D->getAttr()) @@ -240,19 +240,19 @@ void CodeGenModule::SetFunctionAttributesForDefinition(const Decl *D, } if (!Features.Exceptions) - F->addParamAttr(0, llvm::ParamAttr::NoUnwind); + F->addAttribute(0, llvm::Attribute::NoUnwind); } void CodeGenModule::SetMethodAttributes(const ObjCMethodDecl *MD, llvm::Function *F) { - SetFunctionParamAttrs(MD, CGFunctionInfo(MD, Context), F); + SetFunctionAttributes(MD, CGFunctionInfo(MD, Context), F); SetFunctionAttributesForDefinition(MD, F); } void CodeGenModule::SetFunctionAttributes(const FunctionDecl *FD, llvm::Function *F) { - SetFunctionParamAttrs(FD, CGFunctionInfo(FD), F); + SetFunctionAttributes(FD, CGFunctionInfo(FD), F); SetGlobalValueAttributes(FD, FD->getStorageClass() == FunctionDecl::Static, FD->isInline(), F, false); -- cgit v1.2.3-18-g5258