forked from OSchip/llvm-project
[NFC][C API] Make LLVMSetInstrParamAlignment's index param type LLVMAttributeIndex
It's the same as unsigned, but clearer in intent.
This commit is contained in:
parent
dcde8fdeeb
commit
39e2e3bddb
|
@ -1277,7 +1277,7 @@ func (v Value) AddCallSiteAttribute(i int, a Attribute) {
|
|||
C.LLVMAddCallSiteAttribute(v.C, C.LLVMAttributeIndex(i), a.C)
|
||||
}
|
||||
func (v Value) SetInstrParamAlignment(i int, align int) {
|
||||
C.LLVMSetInstrParamAlignment(v.C, C.unsigned(i), C.unsigned(align))
|
||||
C.LLVMSetInstrParamAlignment(v.C, C.LLVMAttributeIndex(i), C.unsigned(align))
|
||||
}
|
||||
func (v Value) CalledValue() (rv Value) {
|
||||
rv.C = C.LLVMGetCalledValue(v.C)
|
||||
|
|
|
@ -3287,7 +3287,7 @@ void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
|
|||
*/
|
||||
unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr);
|
||||
|
||||
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index,
|
||||
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, LLVMAttributeIndex Idx,
|
||||
unsigned Align);
|
||||
|
||||
void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx,
|
||||
|
|
|
@ -2858,12 +2858,12 @@ void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC) {
|
|||
static_cast<CallingConv::ID>(CC));
|
||||
}
|
||||
|
||||
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index,
|
||||
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, LLVMAttributeIndex Idx,
|
||||
unsigned align) {
|
||||
auto *Call = unwrap<CallBase>(Instr);
|
||||
Attribute AlignAttr =
|
||||
Attribute::getWithAlignment(Call->getContext(), Align(align));
|
||||
Call->addAttributeAtIndex(index, AlignAttr);
|
||||
Call->addAttributeAtIndex(Idx, AlignAttr);
|
||||
}
|
||||
|
||||
void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx,
|
||||
|
|
Loading…
Reference in New Issue