From 66c98ee1fbcadb304c51e67c479edae9675c92f9 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Sat, 2 Dec 2023 02:07:47 +0000 Subject: [PATCH] Fix more tests --- tests/assembly/asm/aarch64-modifiers.rs | 2 +- tests/assembly/asm/arm-modifiers.rs | 2 +- tests/assembly/asm/x86-modifiers.rs | 2 +- tests/codegen/avr/avr-func-addrspace.rs | 2 +- .../debuginfo-inline-callsite-location.rs | 2 +- .../nounwind-on-stable-panic-unwind.rs | 18 ------------------ tests/coverage/abort.cov-map | 8 ++++---- 7 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs diff --git a/tests/assembly/asm/aarch64-modifiers.rs b/tests/assembly/asm/aarch64-modifiers.rs index 5196aa9fa1759..2f707e2cdc395 100644 --- a/tests/assembly/asm/aarch64-modifiers.rs +++ b/tests/assembly/asm/aarch64-modifiers.rs @@ -1,5 +1,5 @@ // assembly-output: emit-asm -// compile-flags: -O +// compile-flags: -O -C panic=abort // compile-flags: --target aarch64-unknown-linux-gnu // needs-llvm-components: aarch64 diff --git a/tests/assembly/asm/arm-modifiers.rs b/tests/assembly/asm/arm-modifiers.rs index 88ffeaecfecb6..6c390be8696ea 100644 --- a/tests/assembly/asm/arm-modifiers.rs +++ b/tests/assembly/asm/arm-modifiers.rs @@ -1,5 +1,5 @@ // assembly-output: emit-asm -// compile-flags: -O +// compile-flags: -O -C panic=abort // compile-flags: --target armv7-unknown-linux-gnueabihf // compile-flags: -C target-feature=+neon // needs-llvm-components: arm diff --git a/tests/assembly/asm/x86-modifiers.rs b/tests/assembly/asm/x86-modifiers.rs index 574fdf12cd040..4a58ec52f7540 100644 --- a/tests/assembly/asm/x86-modifiers.rs +++ b/tests/assembly/asm/x86-modifiers.rs @@ -1,6 +1,6 @@ // revisions: x86_64 i686 // assembly-output: emit-asm -// compile-flags: -O +// compile-flags: -O -C panic=abort //[x86_64] compile-flags: --target x86_64-unknown-linux-gnu //[x86_64] needs-llvm-components: x86 //[i686] compile-flags: --target i686-unknown-linux-gnu diff --git a/tests/codegen/avr/avr-func-addrspace.rs b/tests/codegen/avr/avr-func-addrspace.rs index dc36a9fac8c23..f16d43881a429 100644 --- a/tests/codegen/avr/avr-func-addrspace.rs +++ b/tests/codegen/avr/avr-func-addrspace.rs @@ -1,4 +1,4 @@ -// compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib +// compile-flags: -O --target=avr-unknown-gnu-atmega328 --crate-type=rlib -C panic=abort // needs-llvm-components: avr // This test validates that function pointers can be stored in global variables diff --git a/tests/codegen/debuginfo-inline-callsite-location.rs b/tests/codegen/debuginfo-inline-callsite-location.rs index b1475ee793160..b042d181921c9 100644 --- a/tests/codegen/debuginfo-inline-callsite-location.rs +++ b/tests/codegen/debuginfo-inline-callsite-location.rs @@ -20,7 +20,7 @@ #![crate_type = "lib"] #[no_mangle] -extern "C" fn add_numbers(x: &Option, y: &Option) -> i32 { +extern "C-unwind" fn add_numbers(x: &Option, y: &Option) -> i32 { let x1 = x.unwrap(); let y1 = y.unwrap(); diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs deleted file mode 100644 index dc3911cd4ebac..0000000000000 --- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs +++ /dev/null @@ -1,18 +0,0 @@ -// compile-flags: -C opt-level=0 -// ignore-wasm32-bare compiled with panic=abort by default -// needs-unwind - -#![crate_type = "lib"] - -// We disable optimizations to prevent LLVM from inferring the attribute. - -extern "C" { - fn bar(); -} - -// CHECK-NOT: Function Attrs:{{.*}}nounwind -pub unsafe extern "C" fn foo() { - bar(); -} - -// Note that this test will get removed when `C-unwind` is fully stabilized diff --git a/tests/coverage/abort.cov-map b/tests/coverage/abort.cov-map index 45d3795eff8f3..c939ca21e38af 100644 --- a/tests/coverage/abort.cov-map +++ b/tests/coverage/abort.cov-map @@ -1,5 +1,5 @@ Function name: abort::main -Raw bytes (105): 0x[01, 01, 12, 01, 47, 05, 09, 03, 0d, 42, 11, 03, 0d, 11, 3e, 42, 11, 03, 0d, 3b, 15, 11, 3e, 42, 11, 03, 0d, 15, 36, 3b, 15, 11, 3e, 42, 11, 03, 0d, 05, 09, 0d, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 42, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 3e, 02, 0a, 00, 0b, 3b, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 36, 00, 31, 00, 32, 33, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 31, 00, 32, 47, 01, 09, 00, 17, 0d, 02, 05, 01, 02] +Raw bytes (105): 0x[01, 01, 12, 01, 47, 05, 09, 03, 0d, 42, 11, 03, 0d, 11, 3e, 42, 11, 03, 0d, 3b, 15, 11, 3e, 42, 11, 03, 0d, 15, 36, 3b, 15, 11, 3e, 42, 11, 03, 0d, 05, 09, 0d, 01, 0c, 01, 01, 1b, 03, 02, 0b, 00, 18, 42, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 3e, 02, 0a, 00, 0b, 3b, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 36, 00, 31, 00, 32, 33, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 31, 00, 32, 47, 01, 09, 00, 17, 0d, 02, 05, 01, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 18 @@ -22,7 +22,7 @@ Number of expressions: 18 - expression 16 operands: lhs = Expression(0, Add), rhs = Counter(3) - expression 17 operands: lhs = Counter(1), rhs = Counter(2) Number of file 0 mappings: 13 -- Code(Counter(0)) at (prev + 13, 1) to (start + 1, 27) +- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 27) - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24) = (c0 + (c1 + c2)) - Code(Expression(16, Sub)) at (prev + 1, 12) to (start + 0, 25) @@ -44,13 +44,13 @@ Number of file 0 mappings: 13 - Code(Counter(3)) at (prev + 2, 5) to (start + 1, 2) Function name: abort::might_abort -Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 04, 01, 01, 14, 05, 02, 09, 01, 24, 02, 02, 0c, 03, 02] +Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 03, 01, 01, 14, 05, 02, 09, 01, 24, 02, 02, 0c, 03, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 4, 1) to (start + 1, 20) +- Code(Counter(0)) at (prev + 3, 1) to (start + 1, 20) - Code(Counter(1)) at (prev + 2, 9) to (start + 1, 36) - Code(Expression(0, Sub)) at (prev + 2, 12) to (start + 3, 2) = (c0 - c1)