about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/default-requires-uwtable.rs15
-rw-r--r--src/test/codegen/force-no-unwind-tables.rs7
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/codegen/default-requires-uwtable.rs b/src/test/codegen/default-requires-uwtable.rs
new file mode 100644
index 00000000000..d4c4200c5d2
--- /dev/null
+++ b/src/test/codegen/default-requires-uwtable.rs
@@ -0,0 +1,15 @@
+// revisions: WINDOWS ANDROID
+// needs-llvm-components: x86 arm
+// compile-flags: -C panic=abort
+// [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc
+// [ANDROID] compile-flags: --target=armv7-linux-androideabi
+
+#![feature(no_core, lang_items)]
+#![crate_type = "lib"]
+#![no_core]
+
+#[lang = "sized"]
+trait Sized {}
+
+// CHECK: attributes #{{.*}} uwtable
+pub fn foo() {}
diff --git a/src/test/codegen/force-no-unwind-tables.rs b/src/test/codegen/force-no-unwind-tables.rs
new file mode 100644
index 00000000000..dc77e6cb709
--- /dev/null
+++ b/src/test/codegen/force-no-unwind-tables.rs
@@ -0,0 +1,7 @@
+// compile-flags: -C no-prepopulate-passes -C panic=abort -C force-unwind-tables=n
+// ignore-windows
+
+#![crate_type="lib"]
+
+// CHECK-NOT: attributes #{{.*}} uwtable
+pub fn foo() {}