summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/Core.cpp')
-rw-r--r--llvm/lib/VMCore/Core.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp
index 90ecdaecf41..7973325e508 100644
--- a/llvm/lib/VMCore/Core.cpp
+++ b/llvm/lib/VMCore/Core.cpp
@@ -1474,8 +1474,9 @@ LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg) {
void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align) {
- unwrap<Argument>(Arg)->addAttr(
- Attributes::constructAlignmentFromInt(align));
+ Attributes::Builder B;
+ B.addAlignmentAttr(align);
+ unwrap<Argument>(Arg)->addAttr(Attributes::get(B));
}
/*--.. Operations on basic blocks ..........................................--*/
@@ -1678,9 +1679,9 @@ void LLVMRemoveInstrAttribute(LLVMValueRef Instr, unsigned index,
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index,
unsigned align) {
CallSite Call = CallSite(unwrap<Instruction>(Instr));
- Call.setAttributes(
- Call.getAttributes().addAttr(index,
- Attributes::constructAlignmentFromInt(align)));
+ Attributes::Builder B;
+ B.addAlignmentAttr(align);
+ Call.setAttributes(Call.getAttributes().addAttr(index, Attributes::get(B)));
}
/*--.. Operations on call instructions (only) ..............................--*/
OpenPOWER on IntegriCloud