Skip to content

Commit bdc8e5d

Browse files
committed
cleanup, reduce diff
1 parent 9cbdf68 commit bdc8e5d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,14 @@ extern "C" void LLVMRustAddFunctionAttributes(LLVMValueRef Fn, unsigned Index,
300300
AddAttributes(F, Index, Attrs, AttrsLen);
301301
}
302302

303+
extern "C" void LLVMRustAddCallSiteAttributes(LLVMValueRef Instr,
304+
unsigned Index,
305+
LLVMAttributeRef *Attrs,
306+
size_t AttrsLen) {
307+
CallBase *Call = unwrap<CallBase>(Instr);
308+
AddAttributes(Call, Index, Attrs, AttrsLen);
309+
}
310+
303311
extern "C" LLVMAttributeRef
304312
LLVMRustCreateAttrNoValue(LLVMContextRef C, LLVMRustAttribute RustAttr) {
305313
return wrap(Attribute::get(*unwrap(C), fromRust(RustAttr)));
@@ -327,12 +335,6 @@ LLVMRustGetEnumAttributeAtIndex(LLVMValueRef F, size_t index,
327335
return LLVMGetEnumAttributeAtIndex(F, index, fromRust(RustAttr));
328336
}
329337

330-
extern "C" void LLVMRustAddCallSiteAttributes(LLVMValueRef Instr, unsigned Index,
331-
LLVMAttributeRef *Attrs, size_t AttrsLen) {
332-
CallBase *Call = unwrap<CallBase>(Instr);
333-
AddAttributes(Call, Index, Attrs, AttrsLen);
334-
}
335-
336338
extern "C" LLVMAttributeRef LLVMRustCreateAlignmentAttr(LLVMContextRef C,
337339
uint64_t Bytes) {
338340
return wrap(Attribute::getWithAlignment(*unwrap(C), llvm::Align(Bytes)));

0 commit comments

Comments
 (0)