diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-21 14:34:12 +0200 | 
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-22 14:28:48 +0200 | 
| commit | a27f3e3fd1e4d16160f8885b6b06665b5319f56c (patch) | |
| tree | b033935392cbadf6f85d2dbddf433a88e323aeeb /tests/codegen/unwind-abis/vectorcall-unwind-abi.rs | |
| parent | ed93c1783b404d728d4809973a0550eb33cd293f (diff) | |
| download | rust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.tar.gz rust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.zip | |
Rename `tests/codegen` into `tests/codegen-llvm`
Diffstat (limited to 'tests/codegen/unwind-abis/vectorcall-unwind-abi.rs')
| -rw-r--r-- | tests/codegen/unwind-abis/vectorcall-unwind-abi.rs | 36 | 
1 files changed, 0 insertions, 36 deletions
| diff --git a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs b/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs deleted file mode 100644 index d001a16b32a..00000000000 --- a/tests/codegen/unwind-abis/vectorcall-unwind-abi.rs +++ /dev/null @@ -1,36 +0,0 @@ -//@ needs-llvm-components: x86 -//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes -#![no_core] -#![feature(no_core, lang_items, abi_vectorcall)] - -#[lang = "pointee_sized"] -pub trait PointeeSized {} - -#[lang = "meta_sized"] -pub trait MetaSized: PointeeSized {} - -#[lang = "sized"] -pub trait Sized: MetaSized {} - -// Test that `nounwind` attributes are correctly applied to exported `vectorcall` and -// `vectorcall-unwind` extern functions. `vectorcall-unwind` functions MUST NOT have this attribute. -// We disable optimizations above to prevent LLVM from inferring the attribute. - -// CHECK: @rust_item_that_cannot_unwind() unnamed_addr #0 { -#[no_mangle] -pub extern "vectorcall" fn rust_item_that_cannot_unwind() {} - -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { -#[no_mangle] -pub extern "vectorcall-unwind" fn rust_item_that_can_unwind() {} - -// Now, make some assertions that the LLVM attributes for these functions are correct. First, make -// sure that the first item is correctly marked with the `nounwind` attribute: -// -// CHECK: attributes #0 = { {{.*}}nounwind{{.*}} } -// -// Next, let's assert that the second item, which CAN unwind, does not have this attribute. -// -// CHECK: attributes #1 = { -// CHECK-NOT: nounwind -// CHECK: } | 
