Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Commit

Permalink
Revise tests in light of Yorick software tracing MIR pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
vext01 committed Dec 31, 2018
1 parent 3504c9c commit 74a44dc
Show file tree
Hide file tree
Showing 125 changed files with 194 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/test/codegen/alloc-optimisation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//
// no-system-llvm
// compile-flags: -O
// ignore-test FIXME swt_ignore
#![crate_type="lib"]

#[no_mangle]
Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/dealloc-no-unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//
// no-system-llvm
// compile-flags: -O
// ignore-test FIXME swt_ignore

#![crate_type="lib"]

Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/issue-13018.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-test FIXME swt_ignore
// compile-flags: -O

// A drop([...].clone()) sequence on an Rc should be a no-op
Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/issue-34947-pow-i32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// compile-flags: -O

#![crate_type = "lib"]
#![no_trace]

// CHECK-LABEL: @issue_34947
#[no_mangle]
Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/issue-45222.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// min-llvm-version 6.0

#![crate_type = "lib"]
#![no_trace]

// verify that LLVM recognizes a loop involving 0..=n and will const-fold it.

Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/issue-45466.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// min-llvm-version 6.0

#![crate_type="rlib"]
#![no_trace]

// CHECK-LABEL: @memzero
// CHECK-NOT: store
Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/match-optimizes-away.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// no-system-llvm
// compile-flags: -O
#![crate_type="lib"]
#![no_trace]

pub enum Three { A, B, C }

Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// compile-flags: -C no-prepopulate-passes

#![crate_type = "lib"]
#![no_trace]

pub enum E {
A,
Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/repeat-trusted-len.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-test FIXME swt_ignore
// compile-flags: -O
// ignore-tidy-linelength
// min-llvm-version 7.0
Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/scalar-pair-bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// compile-flags: -O

#![crate_type = "lib"]
#![no_trace]

// CHECK: define { i8, i8 } @pair_bool_bool(i1 zeroext %pair.0, i1 zeroext %pair.1)
#[no_mangle]
Expand Down
1 change: 1 addition & 0 deletions src/test/codegen/slice-position-bounds-check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// no-system-llvm
// compile-flags: -O -C panic=abort
#![crate_type = "lib"]
#![no_trace]

fn search<T: Ord + Eq>(arr: &mut [T], a: &T) -> Result<usize, ()> {
match arr.iter().position(|x| x == a) {
Expand Down
4 changes: 4 additions & 0 deletions src/test/compile-fail/two-panic-runtimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
// aux-build:panic-runtime-lang-items.rs

#![no_std]
#![feature(lang_items)]

extern crate panic_runtime_unwind;
extern crate panic_runtime_unwind2;
extern crate panic_runtime_lang_items;

fn main() {}

#[lang = "yk_swt_rec_loc"]
fn yk_swt_rec_loc(_crate_hash: u64, _def_idx: u32, _bb: u32) {}
1 change: 1 addition & 0 deletions src/test/debuginfo/associated-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
#![allow(dead_code)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

trait TraitWithAssocType {
type Type;
Expand Down
2 changes: 2 additions & 0 deletions src/test/debuginfo/borrowed-basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]

#![no_trace]

fn main() {
let bool_val: bool = true;
let bool_ref: &bool = &bool_val;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/borrowed-c-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

enum ABC { TheA, TheB, TheC }

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/borrowed-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

// The first element is to ensure proper alignment, irrespective of the machines word size. Since
// the size of the discriminant value is machine dependent, this has be taken into account when
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/borrowed-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
#![feature(box_syntax)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

struct SomeStruct {
x: isize,
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/borrowed-tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#![feature(box_syntax)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {
let stack_val: (i16, f32) = (-14, -19f32);
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/borrowed-unique-basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
#![feature(box_syntax)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {
let bool_box: Box<bool> = box true;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#![feature(box_syntax)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {
let a = box 1;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/boxed-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#![feature(box_syntax)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

struct StructWithSomePadding {
x: i16,
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/c-style-enum-in-composite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

use self::AnEnum::{OneHundred, OneThousand, OneMillion};
use self::AnotherEnum::{MountainView, Toronto, Vienna};
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/destructured-fn-argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
#![feature(box_syntax)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

use self::Univariant::Unit;

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/destructured-local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
#![feature(box_syntax)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

use self::Univariant::Unit;

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/evec-in-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

struct NoPadding1 {
x: [u32; 3],
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/extern-c-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#![allow(dead_code)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]


#[no_mangle]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar3

#![allow(dead_code, unused_variables)]
#![no_trace]

struct RegularStruct {
the_first_field: isize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
#![allow(dead_code)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

// This test case makes sure that we get correct type descriptions for the enum
// discriminant of different instantiations of the same generic enum type where,
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/generic-function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

#[derive(Clone)]
struct Struct {
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/generic-struct-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

use self::Regular::{Case1, Case2, Case3};
use self::Univariant::TheOnlyCase;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/generic-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

struct AGenericStruct<TKey, TValue> {
key: TKey,
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/generic-tuple-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

use self::Regular::{Case1, Case2, Case3};
use self::Univariant::TheOnlyCase;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/include_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

// This test case makes sure that debug info does not ICE when include_str is
// used multiple times (see issue #11322).
Expand Down
3 changes: 2 additions & 1 deletion src/test/debuginfo/issue-12886.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

// gdb-command:run
// gdb-command:next
// gdb-check:[...]35[...]s
// gdb-check:[...]36[...]s
// gdb-command:continue

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

// IF YOU MODIFY THIS FILE, BE CAREFUL TO ADAPT THE LINE NUMBERS IN THE DEBUGGER COMMANDS

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-in-for-loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-in-if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-in-match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

struct Struct {
x: isize,
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-in-stack-closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-in-unique-closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-in-while.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {

Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/lexical-scope-with-macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

macro_rules! trivial {
($e1:expr) => ($e1)
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/multiple-functions-equal-var-names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn function_one() {
let abc = 10101;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/multiple-functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn function_one() {
let a = 10101;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/name-shadowing-and-scope-nesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@

#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

fn main() {
let x = false;
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/no-debug-attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#![feature(no_debug)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

#[inline(never)]
fn id<T>(x: T) -> T {x}
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/packed-struct-with-destructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

#[repr(packed)]
struct Packed {
Expand Down
1 change: 1 addition & 0 deletions src/test/debuginfo/packed-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
#![allow(unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
#![no_trace]

#[repr(packed)]
struct Packed {
Expand Down
Loading

0 comments on commit 74a44dc

Please sign in to comment.