Use &'static str rather than Cow<str> for pass names.
This commit is contained in:
@@ -45,7 +45,7 @@ impl<'a> Context<'a> {
|
|||||||
/// trait object.
|
/// trait object.
|
||||||
pub trait SubTest {
|
pub trait SubTest {
|
||||||
/// Name identifying this subtest. Typically the same as the test command.
|
/// Name identifying this subtest. Typically the same as the test command.
|
||||||
fn name(&self) -> Cow<str>;
|
fn name(&self) -> &'static str;
|
||||||
|
|
||||||
/// Should the verifier be run on the function before running the test?
|
/// Should the verifier be run on the function before running the test?
|
||||||
fn needs_verifier(&self) -> bool {
|
fn needs_verifier(&self) -> bool {
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ impl binemit::CodeSink for TextSink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestBinEmit {
|
impl SubTest for TestBinEmit {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("binemit")
|
"binemit"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ pub fn subtest(parsed: &TestCommand) -> STResult<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestCat {
|
impl SubTest for TestCat {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("cat")
|
"cat"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn needs_verifier(&self) -> bool {
|
fn needs_verifier(&self) -> bool {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestCompile {
|
impl SubTest for TestCompile {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("compile")
|
"compile"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestDCE {
|
impl SubTest for TestDCE {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("dce")
|
"dce"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestDomtree {
|
impl SubTest for TestDomtree {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("domtree")
|
"domtree"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract our own dominator tree from
|
// Extract our own dominator tree from
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestLegalizer {
|
impl SubTest for TestLegalizer {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("legalizer")
|
"legalizer"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestLICM {
|
impl SubTest for TestLICM {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("licm")
|
"licm"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestPostopt {
|
impl SubTest for TestPostopt {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("postopt")
|
"postopt"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestPreopt {
|
impl SubTest for TestPreopt {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("preopt")
|
"preopt"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ pub fn subtest(parsed: &TestCommand) -> STResult<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestPrintCfg {
|
impl SubTest for TestPrintCfg {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("print-cfg")
|
"print-cfg"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn needs_verifier(&self) -> bool {
|
fn needs_verifier(&self) -> bool {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestRegalloc {
|
impl SubTest for TestRegalloc {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("regalloc")
|
"regalloc"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestSimpleGVN {
|
impl SubTest for TestSimpleGVN {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("simple-gvn")
|
"simple-gvn"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_mutating(&self) -> bool {
|
fn is_mutating(&self) -> bool {
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ pub fn subtest(parsed: &TestCommand) -> Result<Box<SubTest>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SubTest for TestVerifier {
|
impl SubTest for TestVerifier {
|
||||||
fn name(&self) -> Cow<str> {
|
fn name(&self) -> &'static str {
|
||||||
Cow::from("verifier")
|
"verifier"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn needs_verifier(&self) -> bool {
|
fn needs_verifier(&self) -> bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user