about summary refs log tree commit diff
path: root/src/test/codegen/stack-alloc-string-slice.rs
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2015-05-24 18:07:52 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2015-05-27 12:08:31 +0200
commit677367599e8383c355b8e8261cafe3ce44c9c6de (patch)
treec784e078189f4fcbcd85a0f4aca51968453db64e /src/test/codegen/stack-alloc-string-slice.rs
parentba0e1cd8147d452c356aacb29fb87568ca26f111 (diff)
downloadrust-677367599e8383c355b8e8261cafe3ce44c9c6de.tar.gz
rust-677367599e8383c355b8e8261cafe3ce44c9c6de.zip
Revamp codegen tests to check IR quality instead of quantity
The current codegen tests only compare IR line counts between similar
rust and C programs, the latter getting compiled with clang. That looked
like a good idea back then, but actually things like lifetime intrinsics
mean that less IR isn't always better, so the metric isn't really
helpful.

Instead, we can start doing tests that check specific aspects of the
generated IR, like attributes or metadata. To do that, we can use LLVM's
FileCheck tool which has a number of useful features for such tests.

To start off, I created some tests for a few things that were recently
added and/or broken.
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.rs')
-rw-r--r--src/test/codegen/stack-alloc-string-slice.rs14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/codegen/stack-alloc-string-slice.rs b/src/test/codegen/stack-alloc-string-slice.rs
deleted file mode 100644
index 188ee246bf3..00000000000
--- a/src/test/codegen/stack-alloc-string-slice.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[no_mangle]
-pub fn test() {
-    let _x = "hello";
-}