diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/codegen/unwind-abis/aapcs-unwind-abi.rs | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/codegen/unwind-abis/aapcs-unwind-abi.rs')
-rw-r--r-- | src/test/codegen/unwind-abis/aapcs-unwind-abi.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/test/codegen/unwind-abis/aapcs-unwind-abi.rs b/src/test/codegen/unwind-abis/aapcs-unwind-abi.rs deleted file mode 100644 index c092e28a0..000000000 --- a/src/test/codegen/unwind-abis/aapcs-unwind-abi.rs +++ /dev/null @@ -1,31 +0,0 @@ -// needs-llvm-components: arm -// compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes -#![no_core] -#![feature(no_core, lang_items, c_unwind)] -#[lang="sized"] -trait Sized { } - -// Test that `nounwind` attributes are correctly applied to exported `aapcs` and -// `aapcs-unwind` extern functions. `aapcs-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 "aapcs" fn rust_item_that_cannot_unwind() { -} - -// CHECK: @rust_item_that_can_unwind() unnamed_addr #1 { -#[no_mangle] -pub extern "aapcs-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: } |