From 785b778203a474c6e4b9e17ae91cd2a358868877 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 7 Dec 2012 23:17:26 +0000 Subject: [PATCH] s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169652 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGCall.cpp | 6 +++--- lib/CodeGen/CGStmt.cpp | 2 +- lib/CodeGen/CodeGenModule.cpp | 12 ++++++------ lib/CodeGen/TargetInfo.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 1047931b60..77498cb8fb 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -1049,7 +1049,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (RetAttrs.hasAttributes()) PAL.push_back(llvm:: - AttributeWithIndex::get(llvm::AttrListPtr::ReturnIndex, + AttributeWithIndex::get(llvm::AttributeSet::ReturnIndex, llvm::Attributes::get(getLLVMContext(), RetAttrs))); @@ -1136,7 +1136,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, } if (FuncAttrs.hasAttributes()) PAL.push_back(llvm:: - AttributeWithIndex::get(llvm::AttrListPtr::FunctionIndex, + AttributeWithIndex::get(llvm::AttributeSet::FunctionIndex, llvm::Attributes::get(getLLVMContext(), FuncAttrs))); } @@ -2230,7 +2230,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, unsigned CallingConv; CodeGen::AttributeListType AttributeList; CGM.ConstructAttributeList(CallInfo, TargetDecl, AttributeList, CallingConv); - llvm::AttrListPtr Attrs = llvm::AttrListPtr::get(getLLVMContext(), + llvm::AttributeSet Attrs = llvm::AttributeSet::get(getLLVMContext(), AttributeList); llvm::BasicBlock *InvokeDest = 0; diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 7f2a982d3e..eafa550765 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -1640,7 +1640,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { llvm::InlineAsm::get(FTy, AsmString, Constraints, HasSideEffect, /* IsAlignStack */ false, AsmDialect); llvm::CallInst *Result = Builder.CreateCall(IA, Args); - Result->addAttribute(llvm::AttrListPtr::FunctionIndex, + Result->addAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attributes::get(getLLVMContext(), llvm::Attributes::NoUnwind)); diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 6602cc46bf..8a6f05368f 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -533,7 +533,7 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D, unsigned CallingConv; AttributeListType AttributeList; ConstructAttributeList(Info, D, AttributeList, CallingConv); - F->setAttributes(llvm::AttrListPtr::get(getLLVMContext(), AttributeList)); + F->setAttributes(llvm::AttributeSet::get(getLLVMContext(), AttributeList)); F->setCallingConv(static_cast(CallingConv)); } @@ -1143,7 +1143,7 @@ CodeGenModule::GetOrCreateLLVMFunction(StringRef MangledName, if (D.getDecl()) SetFunctionAttributes(D, F, IsIncompleteFunction); if (ExtraAttrs.hasAttributes()) - F->addAttribute(llvm::AttrListPtr::FunctionIndex, ExtraAttrs); + F->addAttribute(llvm::AttributeSet::FunctionIndex, ExtraAttrs); // This is the first use or definition of a mangled name. If there is a // deferred decl with this name, remember that we need to emit it at the end @@ -1819,7 +1819,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, // Get the attribute list. llvm::SmallVector AttrVec; - llvm::AttrListPtr AttrList = CI->getAttributes(); + llvm::AttributeSet AttrList = CI->getAttributes(); // Get any return attributes. llvm::Attributes RAttrs = AttrList.getRetAttributes(); @@ -1827,7 +1827,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, // Add the return attributes. if (RAttrs.hasAttributes()) AttrVec.push_back(llvm:: - AttributeWithIndex::get(llvm::AttrListPtr::ReturnIndex, + AttributeWithIndex::get(llvm::AttributeSet::ReturnIndex, RAttrs)); // If the function was passed too few arguments, don't transform. If extra @@ -1854,7 +1854,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, llvm::Attributes FnAttrs = AttrList.getFnAttributes(); if (FnAttrs.hasAttributes()) AttrVec.push_back(llvm:: - AttributeWithIndex::get(llvm::AttrListPtr::FunctionIndex, + AttributeWithIndex::get(llvm::AttributeSet::FunctionIndex, FnAttrs)); // Okay, we can transform this. Create the new call instruction and copy @@ -1864,7 +1864,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, ArgList.clear(); if (!NewCall->getType()->isVoidTy()) NewCall->takeName(CI); - NewCall->setAttributes(llvm::AttrListPtr::get(OldFn->getContext(), AttrVec)); + NewCall->setAttributes(llvm::AttributeSet::get(OldFn->getContext(), AttrVec)); NewCall->setCallingConv(CI->getCallingConv()); // Finally, remove the old call, replacing any uses with the new one. diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 02f451a420..61128c401c 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -1019,7 +1019,7 @@ void X86_32TargetCodeGenInfo::SetTargetAttributes(const Decl *D, // Now add the 'alignstack' attribute with a value of 16. llvm::AttrBuilder B; B.addStackAlignmentAttr(16); - Fn->addAttribute(llvm::AttrListPtr::FunctionIndex, + Fn->addAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attributes::get(CGM.getLLVMContext(), B)); } } -- 2.40.0