about summary refs log tree commit diff
path: root/tests/codegen/function-return.rs
diff options
context:
space:
mode:
authorFolkert de Vries <flokkievids@gmail.com>2025-07-23 13:26:30 +0000
committerGitHub <noreply@github.com>2025-07-23 13:26:30 +0000
commit0231fa9adfdc4c03d122087a4400a8199b97a369 (patch)
treee783ca2321426d54b49a031bc9e3ceda4f076375 /tests/codegen/function-return.rs
parent75fc5ceefb9dc46a1e0956143c98eb419ce2e3b5 (diff)
parent8f0ffa8125f00af923098b30f390f6597b89d80d (diff)
downloadrust-0231fa9adfdc4c03d122087a4400a8199b97a369.tar.gz
rust-0231fa9adfdc4c03d122087a4400a8199b97a369.zip
Merge pull request #1883 from Kobzol/pull
Rustc pull update
Diffstat (limited to 'tests/codegen/function-return.rs')
-rw-r--r--tests/codegen/function-return.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/codegen/function-return.rs b/tests/codegen/function-return.rs
deleted file mode 100644
index 4127f516038..00000000000
--- a/tests/codegen/function-return.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Test that the `fn_ret_thunk_extern` function attribute is (not) emitted when
-// the `-Zfunction-return={keep,thunk-extern}` flag is (not) set.
-
-//@ add-core-stubs
-//@ revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep
-//@ needs-llvm-components: x86
-//@ compile-flags: --target x86_64-unknown-linux-gnu
-//@ [keep] compile-flags: -Zfunction-return=keep
-//@ [thunk-extern] compile-flags: -Zfunction-return=thunk-extern
-//@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern
-//@ [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep
-
-#![crate_type = "lib"]
-#![feature(no_core, lang_items)]
-#![no_core]
-
-extern crate minicore;
-use minicore::*;
-
-#[no_mangle]
-pub fn foo() {
-    // CHECK: @foo() unnamed_addr #0
-
-    // unset-NOT: fn_ret_thunk_extern
-    // keep-NOT: fn_ret_thunk_extern
-    // thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} }
-    // keep-thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} }
-    // thunk-extern-keep-NOT: fn_ret_thunk_extern
-}
-
-// unset-NOT: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// keep-NOT: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// thunk-extern: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// keep-thunk-extern: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}
-// thunk-extern-keep-NOT: !{{[0-9]+}} = !{i32 4, !"function_return_thunk_extern", i32 1}