about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-06 02:34:11 +0000
committerbors <bors@rust-lang.org>2023-07-06 02:34:11 +0000
commit0d50ab77397d7278500abd22d34de0e10940b2ee (patch)
tree02a35487baaef052fd3f02c7b935276f4df24468 /compiler/rustc_codegen_llvm/src/llvm/ffi.rs
parentbd8aabef316bf8779193798eaf35b8749221a9b4 (diff)
parentc668eb086e27985043b060b82d913520fd24612b (diff)
downloadrust-0d50ab77397d7278500abd22d34de0e10940b2ee.tar.gz
rust-0d50ab77397d7278500abd22d34de0e10940b2ee.zip
Auto merge of #113391 - fee1-dead-contrib:rollup-9bqlw9z, r=fee1-dead
Rollup of 9 pull requests

Successful merges:

 - #111119 (style-guide: Add chapter about formatting for nightly-only syntax)
 - #112791 (llvm ffi: Expose `CallInst->setTailCallKind`)
 - #113145 (style-guide: Document newline rules for assignment operators)
 - #113163 (Add a regression test for #112895)
 - #113332 (resolve: Use `Interned` for some interned structures)
 - #113334 (Revert the lexing of `c"…"` string literals)
 - #113350 (Fix the issue of wrong diagnosis for extern pub fn)
 - #113371 (Fix submodule handling when the current branch is named after a tag)
 - #113384 (style-guide: Clarify grammar for small patterns (not a semantic change))

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index 8ee40b98e2d..3ad546b61e9 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -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;