if (RetAttrs.hasAttributes())
PAL.push_back(llvm::
- AttributeWithIndex::get(0,
+ AttributeWithIndex::get(llvm::AttrListPtr::ReturnIndex,
llvm::Attributes::get(getLLVMContext(),
RetAttrs)));
++Index;
}
if (FuncAttrs.hasAttributes())
- PAL.push_back(llvm::AttributeWithIndex::get(~0,
+ PAL.push_back(llvm::
+ AttributeWithIndex::get(llvm::AttrListPtr::FunctionIndex,
llvm::Attributes::get(getLLVMContext(),
FuncAttrs)));
}
llvm::CallInst *Result = Builder.CreateCall(IA, Args);
llvm::Attributes::Builder B;
B.addAttribute(llvm::Attributes::NoUnwind);
- Result->addAttribute(~0, llvm::Attributes::get(getLLVMContext(), B));
+ Result->addAttribute(llvm::AttrListPtr::FunctionIndex,
+ llvm::Attributes::get(getLLVMContext(), B));
// Slap the source location of the inline asm into a !srcloc metadata on the
// call. FIXME: Handle metadata for MS-style inline asms.
if (D.getDecl())
SetFunctionAttributes(D, F, IsIncompleteFunction);
if (ExtraAttrs.hasAttributes())
- F->addAttribute(~0, ExtraAttrs);
+ F->addAttribute(llvm::AttrListPtr::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
// Add the return attributes.
if (RAttrs.hasAttributes())
- AttrVec.push_back(llvm::AttributeWithIndex::get(0, RAttrs));
+ AttrVec.push_back(llvm::
+ AttributeWithIndex::get(llvm::AttrListPtr::ReturnIndex,
+ RAttrs));
// If the function was passed too few arguments, don't transform. If extra
// arguments were passed, we silently drop them. If any of the types
llvm::Attributes FnAttrs = AttrList.getFnAttributes();
if (FnAttrs.hasAttributes())
- AttrVec.push_back(llvm::AttributeWithIndex::get(~0, FnAttrs));
+ AttrVec.push_back(llvm::
+ AttributeWithIndex::get(llvm::AttrListPtr::FunctionIndex,
+ FnAttrs));
// Okay, we can transform this. Create the new call instruction and copy
// over the required information.
// Now add the 'alignstack' attribute with a value of 16.
llvm::Attributes::Builder B;
B.addStackAlignmentAttr(16);
- Fn->addAttribute(~0U, llvm::Attributes::get(CGM.getLLVMContext(), B));
+ Fn->addAttribute(llvm::AttrListPtr::FunctionIndex,
+ llvm::Attributes::get(CGM.getLLVMContext(), B));
}
}
}