forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtailcc.rs
More file actions
28 lines (24 loc) · 808 Bytes
/
Copy pathtailcc.rs
File metadata and controls
28 lines (24 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//@ add-minicore
//@ revisions: I586 X86_64 AARCH64
//@ [I586] compile-flags: -C no-prepopulate-passes --target=i586-unknown-linux-gnu
//@ [I586] needs-llvm-components: x86
//@ [X86_64] compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu
//@ [X86_64] needs-llvm-components: x86
//@ [AARCH64] compile-flags: -C no-prepopulate-passes --target=aarch64-unknown-linux-gnu
//@ [AARCH64] needs-llvm-components: aarch64
#![crate_type = "lib"]
#![feature(no_core, rust_tail_cc, explicit_tail_calls)]
#![no_core]
extern crate minicore;
// CHECK: define{{( dso_local)?}} tailcc void @peach(i16
#[no_mangle]
#[inline(never)]
pub extern "tail" fn peach(_: u16) {
loop {}
}
// CHECK: call tailcc void @peach(i16
pub fn quince(x: u16) {
if let 12345u16 = x {
peach(54321);
}
}