about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorColin Pronovost <colin.pron@live.com>2018-05-23 15:19:07 -0400
committerColin Pronovost <colin.pron@live.com>2018-07-31 23:45:18 -0400
commit02190f397ecb32bca42e5b631dc235381d01b377 (patch)
treed160894619868dd7116a5bfdff9fef44e2c8a042 /src/test
parente94df4acb4c3f42fdc224a7164b63a99240add1e (diff)
downloadrust-02190f397ecb32bca42e5b631dc235381d01b377.tar.gz
rust-02190f397ecb32bca42e5b631dc235381d01b377.zip
Make globals with private linkage unnamed. Fixes #50862.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/codegen/consts.rs4
-rw-r--r--src/test/codegen/remap_path_prefix/main.rs2
-rw-r--r--src/test/run-make-fulldeps/symbols-are-reasonable/Makefile13
-rw-r--r--src/test/run-make-fulldeps/symbols-are-reasonable/lib.rs21
4 files changed, 3 insertions, 37 deletions
diff --git a/src/test/codegen/consts.rs b/src/test/codegen/consts.rs
index 30fffbb769b..301f5544486 100644
--- a/src/test/codegen/consts.rs
+++ b/src/test/codegen/consts.rs
@@ -21,11 +21,11 @@
 // CHECK: @STATIC = {{.*}}, align 4
 
 // This checks the constants from inline_enum_const
-// CHECK: @byte_str.{{[0-9]+}} = {{.*}}, align 2
+// CHECK: @{{[0-9]+}} = {{.*}}, align 2
 
 // This checks the constants from {low,high}_align_const, they share the same
 // constant, but the alignment differs, so the higher one should be used
-// CHECK: [[LOW_HIGH:@byte_str.[0-9]+]] = {{.*}}, align 4
+// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}}, align 4
 
 #[derive(Copy, Clone)]
 
diff --git a/src/test/codegen/remap_path_prefix/main.rs b/src/test/codegen/remap_path_prefix/main.rs
index 4fb8c37558d..dd0f89c931d 100644
--- a/src/test/codegen/remap_path_prefix/main.rs
+++ b/src/test/codegen/remap_path_prefix/main.rs
@@ -22,7 +22,7 @@ mod aux_mod;
 include!("aux_mod.rs");
 
 // Here we check that the expansion of the file!() macro is mapped.
-// CHECK: @byte_str.1 = private unnamed_addr constant <{ [34 x i8] }> <{ [34 x i8] c"/the/src/remap_path_prefix/main.rs" }>, align 1
+// CHECK: @0 = private unnamed_addr constant <{ [34 x i8] }> <{ [34 x i8] c"/the/src/remap_path_prefix/main.rs" }>, align 1
 pub static FILE_PATH: &'static str = file!();
 
 fn main() {
diff --git a/src/test/run-make-fulldeps/symbols-are-reasonable/Makefile b/src/test/run-make-fulldeps/symbols-are-reasonable/Makefile
deleted file mode 100644
index a6d294d2a1c..00000000000
--- a/src/test/run-make-fulldeps/symbols-are-reasonable/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
--include ../tools.mk
-
-# check that the compile generated symbols for strings, binaries,
-# vtables, etc. have semisane names (e.g. `str.1234`); it's relatively
-# easy to accidentally modify the compiler internals to make them
-# become things like `str"str"(1234)`.
-
-OUT=$(TMPDIR)/lib.s
-
-all:
-	$(RUSTC) lib.rs --emit=asm --crate-type=staticlib
-	# just check for symbol declarations with the names we're expecting.
-	$(CGREP) -e 'str\.[0-9]+:' 'byte_str\.[0-9]+:' 'vtable\.[0-9]+' < $(OUT)
diff --git a/src/test/run-make-fulldeps/symbols-are-reasonable/lib.rs b/src/test/run-make-fulldeps/symbols-are-reasonable/lib.rs
deleted file mode 100644
index b9285b24cd6..00000000000
--- a/src/test/run-make-fulldeps/symbols-are-reasonable/lib.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2014 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.
-
-pub static X: &'static str = "foobarbaz";
-pub static Y: &'static [u8] = include_bytes!("lib.rs");
-
-trait Foo { fn dummy(&self) { } }
-impl Foo for usize {}
-
-#[no_mangle]
-pub extern "C" fn dummy() {
-    // force the vtable to be created
-    let _x = &1usize as &Foo;
-}