about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorhyd-dev <yd-huang@outlook.com>2021-03-25 18:49:35 +0800
committerhyd-dev <yd-huang@outlook.com>2021-04-11 22:32:40 +0800
commit2fd4dd20d717b3e8af4bdff2873b348920426425 (patch)
treed20af30295fee75b8cebd4de5d7ffbdd9777bcf2 /src/test/codegen
parent58f32da346642ff3f50186f6f4a0de46e61008be (diff)
downloadrust-2fd4dd20d717b3e8af4bdff2873b348920426425.tar.gz
rust-2fd4dd20d717b3e8af4bdff2873b348920426425.zip
Allow using `-C force-unwind-tables=no` when `panic=unwind`
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/force-no-unwind-tables.rs6
-rw-r--r--src/test/codegen/panic-unwind-default-uwtable.rs6
2 files changed, 11 insertions, 1 deletions
diff --git a/src/test/codegen/force-no-unwind-tables.rs b/src/test/codegen/force-no-unwind-tables.rs
index dc77e6cb709..3ee23f05eb2 100644
--- a/src/test/codegen/force-no-unwind-tables.rs
+++ b/src/test/codegen/force-no-unwind-tables.rs
@@ -3,5 +3,9 @@
 
 #![crate_type="lib"]
 
+// CHECK-LABEL: define{{.*}}void @foo
 // CHECK-NOT: attributes #{{.*}} uwtable
-pub fn foo() {}
+#[no_mangle]
+fn foo() {
+    panic!();
+}
diff --git a/src/test/codegen/panic-unwind-default-uwtable.rs b/src/test/codegen/panic-unwind-default-uwtable.rs
new file mode 100644
index 00000000000..4c85008cf35
--- /dev/null
+++ b/src/test/codegen/panic-unwind-default-uwtable.rs
@@ -0,0 +1,6 @@
+// compile-flags: -C panic=unwind -C no-prepopulate-passes
+
+#![crate_type = "lib"]
+
+// CHECK: attributes #{{.*}} uwtable
+pub fn foo() {}