if (RetAttrs.hasAttributes())
PAL.push_back(llvm::
- AttributeWithIndex::get(llvm::AttrListPtr::ReturnIndex,
+ AttributeWithIndex::get(llvm::AttributeSet::ReturnIndex,
llvm::Attributes::get(getLLVMContext(),
RetAttrs)));
}
if (FuncAttrs.hasAttributes())
PAL.push_back(llvm::
- AttributeWithIndex::get(llvm::AttrListPtr::FunctionIndex,
+ AttributeWithIndex::get(llvm::AttributeSet::FunctionIndex,
llvm::Attributes::get(getLLVMContext(),
FuncAttrs)));
}
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;
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));
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<llvm::CallingConv::ID>(CallingConv));
}
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
// Get the attribute list.
llvm::SmallVector<llvm::AttributeWithIndex, 8> AttrVec;
- llvm::AttrListPtr AttrList = CI->getAttributes();
+ llvm::AttributeSet AttrList = CI->getAttributes();
// Get any return attributes.
llvm::Attributes RAttrs = AttrList.getRetAttributes();
// 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
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
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.