mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Use builder to create alignment attributes. Remove dead function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+6
-5
@@ -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) ..............................--*/
|
||||
|
||||
Reference in New Issue
Block a user