1
Fork 0

Rollup merge of #112791 - WaffleLapkin:wag_the_llvm, r=cuviper

llvm ffi: Expose `CallInst->setTailCallKind`

This is needed for the explicit tail calls experiment.
This commit is contained in:
fee1-dead 2023-07-06 09:20:31 +08:00 committed by GitHub
commit e461502e06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

View file

@ -585,6 +585,16 @@ pub enum ThreadLocalMode {
LocalExec,
}
/// LLVMRustTailCallKind
#[derive(Copy, Clone)]
#[repr(C)]
pub enum TailCallKind {
None,
Tail,
MustTail,
NoTail,
}
/// LLVMRustChecksumKind
#[derive(Copy, Clone)]
#[repr(C)]
@ -1196,6 +1206,7 @@ extern "C" {
NameLen: size_t,
) -> Option<&Value>;
pub fn LLVMSetTailCall(CallInst: &Value, IsTailCall: Bool);
pub fn LLVMRustSetTailCallKind(CallInst: &Value, TKC: TailCallKind);
// Operations on attributes
pub fn LLVMRustCreateAttrNoValue(C: &Context, attr: AttributeKind) -> &Attribute;