SubclassOptionalData = CI.SubclassOptionalData;
}
-void CallInst::addAttribute(unsigned i, Attribute attr) {
+void CallInst::addAttribute(unsigned i, Attribute::AttrKind attr) {
AttributeSet PAL = getAttributes();
- AttrBuilder B(attr);
- LLVMContext &Context = getContext();
- PAL = PAL.addAttributes(Context, i,
- AttributeSet::get(Context, i, B));
+ PAL = PAL.addAttribute(getContext(), i, attr);
setAttributes(PAL);
}
return false;
}
-void InvokeInst::addAttribute(unsigned i, Attribute attr) {
+void InvokeInst::addAttribute(unsigned i, Attribute::AttrKind attr) {
AttributeSet PAL = getAttributes();
- AttrBuilder B(attr);
- PAL = PAL.addAttributes(getContext(), i,
- AttributeSet::get(getContext(), i, B));
+ PAL = PAL.addAttribute(getContext(), i, attr);
setAttributes(PAL);
}