about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-03-10 21:20:09 +0200
committerEduard Burtescu <edy.burt@gmail.com>2016-03-17 22:48:07 +0200
commit473f804491772fe9a31f4096c3ec8da121fc8294 (patch)
treec487b55e6a1e18350639e5fc52485fb828bacc44 /src/test/codegen
parent080bd97781ee419722df8394a0155b5db069a490 (diff)
downloadrust-473f804491772fe9a31f4096c3ec8da121fc8294.tar.gz
rust-473f804491772fe9a31f4096c3ec8da121fc8294.zip
Add #[rustc_no_mir] to make tests pass with -Z orbit.
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/adjustments.rs2
-rw-r--r--src/test/codegen/coercions.rs3
-rw-r--r--src/test/codegen/consts.rs5
-rw-r--r--src/test/codegen/drop.rs2
-rw-r--r--src/test/codegen/refs.rs2
-rw-r--r--src/test/codegen/stores.rs3
6 files changed, 17 insertions, 0 deletions
diff --git a/src/test/codegen/adjustments.rs b/src/test/codegen/adjustments.rs
index a61fa84398e..20d04939434 100644
--- a/src/test/codegen/adjustments.rs
+++ b/src/test/codegen/adjustments.rs
@@ -11,6 +11,7 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
+#![feature(rustc_attrs)]
 
 // Hack to get the correct size for the length part in slices
 // CHECK: @helper([[USIZE:i[0-9]+]])
@@ -20,6 +21,7 @@ fn helper(_: usize) {
 
 // CHECK-LABEL: @no_op_slice_adjustment
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn no_op_slice_adjustment(x: &[u8]) -> &[u8] {
     // We used to generate an extra alloca and memcpy for the block's trailing expression value, so
     // check that we copy directly to the return value slot
diff --git a/src/test/codegen/coercions.rs b/src/test/codegen/coercions.rs
index c8c9f5b407c..74c7192259a 100644
--- a/src/test/codegen/coercions.rs
+++ b/src/test/codegen/coercions.rs
@@ -11,12 +11,14 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
+#![feature(rustc_attrs)]
 
 static X: i32 = 5;
 
 // CHECK-LABEL: @raw_ptr_to_raw_ptr_noop
 // CHECK-NOT: alloca
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn raw_ptr_to_raw_ptr_noop() -> *const i32{
     &X as *const i32
 }
@@ -24,6 +26,7 @@ pub fn raw_ptr_to_raw_ptr_noop() -> *const i32{
 // CHECK-LABEL: @reference_to_raw_ptr_noop
 // CHECK-NOT: alloca
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn reference_to_raw_ptr_noop() -> *const i32 {
     &X
 }
diff --git a/src/test/codegen/consts.rs b/src/test/codegen/consts.rs
index 6b4e626df92..ea4c932d435 100644
--- a/src/test/codegen/consts.rs
+++ b/src/test/codegen/consts.rs
@@ -11,6 +11,7 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
+#![feature(rustc_attrs)]
 
 // Below, these constants are defined as enum variants that by itself would
 // have a lower alignment than the enum type. Ensure that we mark them
@@ -39,18 +40,21 @@ pub static STATIC: E<i16, i32> = E::A(0);
 
 // CHECK-LABEL: @static_enum_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn static_enum_const() -> E<i16, i32> {
    STATIC
 }
 
 // CHECK-LABEL: @inline_enum_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn inline_enum_const() -> E<i8, i16> {
     E::A(0)
 }
 
 // CHECK-LABEL: @low_align_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn low_align_const() -> E<i16, [i16; 3]> {
 // Check that low_align_const and high_align_const use the same constant
 // CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]+}}, i8* {{.*}} [[LOW_HIGH:@const[0-9]+]]
@@ -59,6 +63,7 @@ pub fn low_align_const() -> E<i16, [i16; 3]> {
 
 // CHECK-LABEL: @high_align_const
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn high_align_const() -> E<i16, i32> {
 // Check that low_align_const and high_align_const use the same constant
 // CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]}}, i8* {{.*}} [[LOW_HIGH]]
diff --git a/src/test/codegen/drop.rs b/src/test/codegen/drop.rs
index 2ac8de6d802..83dd6a3b002 100644
--- a/src/test/codegen/drop.rs
+++ b/src/test/codegen/drop.rs
@@ -11,6 +11,7 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
+#![feature(rustc_attrs)]
 
 struct SomeUniqueName;
 
@@ -24,6 +25,7 @@ pub fn possibly_unwinding() {
 
 // CHECK-LABEL: @droppy
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn droppy() {
 // Check that there are exactly 6 drop calls. The cleanups for the unwinding should be reused, so
 // that's one new drop call per call to possibly_unwinding(), and finally 3 drop calls for the
diff --git a/src/test/codegen/refs.rs b/src/test/codegen/refs.rs
index 08eec0045f7..36c83412e4f 100644
--- a/src/test/codegen/refs.rs
+++ b/src/test/codegen/refs.rs
@@ -11,6 +11,7 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
+#![feature(rustc_attrs)]
 
 // Hack to get the correct size for the length part in slices
 // CHECK: @helper([[USIZE:i[0-9]+]])
@@ -20,6 +21,7 @@ fn helper(_: usize) {
 
 // CHECK-LABEL: @ref_dst
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn ref_dst(s: &[u8]) {
     // We used to generate an extra alloca and memcpy to ref the dst, so check that we copy
     // directly to the alloca for "x"
diff --git a/src/test/codegen/stores.rs b/src/test/codegen/stores.rs
index 46e4c5f341b..f849a6c9b18 100644
--- a/src/test/codegen/stores.rs
+++ b/src/test/codegen/stores.rs
@@ -11,6 +11,7 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
+#![feature(rustc_attrs)]
 
 pub struct Bytes {
   a: u8,
@@ -23,6 +24,7 @@ pub struct Bytes {
 // The array is stored as i32, but its alignment is lower, go with 1 byte to avoid target
 // dependent alignment
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn small_array_alignment(x: &mut [i8; 4], y: [i8; 4]) {
 // CHECK: [[VAR:%[0-9]+]] = bitcast [4 x i8]* %y to i32*
 // CHECK: store i32 %{{.*}}, i32* [[VAR]], align 1
@@ -33,6 +35,7 @@ pub fn small_array_alignment(x: &mut [i8; 4], y: [i8; 4]) {
 // The struct is stored as i32, but its alignment is lower, go with 1 byte to avoid target
 // dependent alignment
 #[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn small_struct_alignment(x: &mut Bytes, y: Bytes) {
 // CHECK: [[VAR:%[0-9]+]] = bitcast %Bytes* %y to i32*
 // CHECK: store i32 %{{.*}}, i32* [[VAR]], align 1