about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-10-15 20:07:35 +0000
committerbors <bors@rust-lang.org>2017-10-15 20:07:35 +0000
commit29ed49fb0aeab444adcfe16ef3d04e5e910fb08d (patch)
tree612a8d9d8aab8b4498c7e57d179f63e499f18663 /src/test
parentc4f489af912bea9ca9f0fa0378d7c0acacf6c59e (diff)
parent2e1c4cd0f51c28b8cfc003fda67f6641bb4335f2 (diff)
downloadrust-29ed49fb0aeab444adcfe16ef3d04e5e910fb08d.tar.gz
rust-29ed49fb0aeab444adcfe16ef3d04e5e910fb08d.zip
Auto merge of #45215 - alexcrichton:thin-lto-reference-more, r=michaelwoerister
rustc: Fix some ThinLTO internalization

First the `addPreservedGUID` function forgot to take care of "alias" summaries.
I'm not 100% sure what this is but the current code now matches upstream. Next
the `computeDeadSymbols` return value wasn't actually being used, but it needed
to be used! Together these should...

Closes #45195
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/thinlto/auxiliary/dylib.rs16
-rw-r--r--src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs (renamed from src/test/run-pass/auxiliary/thin-lto-inlines-aux.rs)0
-rw-r--r--src/test/run-pass/thinlto/dylib-works.rs18
-rw-r--r--src/test/run-pass/thinlto/thin-lto-inlines.rs (renamed from src/test/run-pass/thin-lto-inlines.rs)0
-rw-r--r--src/test/run-pass/thinlto/thin-lto-inlines2.rs (renamed from src/test/run-pass/thin-lto-inlines2.rs)0
5 files changed, 34 insertions, 0 deletions
diff --git a/src/test/run-pass/thinlto/auxiliary/dylib.rs b/src/test/run-pass/thinlto/auxiliary/dylib.rs
new file mode 100644
index 00000000000..cdb3f49cae8
--- /dev/null
+++ b/src/test/run-pass/thinlto/auxiliary/dylib.rs
@@ -0,0 +1,16 @@
+// Copyright 2017 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.
+
+// compile-flags: -Z thinlto -C codegen-units=8
+
+#[inline]
+pub fn foo(b: u8) {
+    b.to_string();
+}
diff --git a/src/test/run-pass/auxiliary/thin-lto-inlines-aux.rs b/src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs
index ccbb0e7a718..ccbb0e7a718 100644
--- a/src/test/run-pass/auxiliary/thin-lto-inlines-aux.rs
+++ b/src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs
diff --git a/src/test/run-pass/thinlto/dylib-works.rs b/src/test/run-pass/thinlto/dylib-works.rs
new file mode 100644
index 00000000000..3f54519d0d8
--- /dev/null
+++ b/src/test/run-pass/thinlto/dylib-works.rs
@@ -0,0 +1,18 @@
+// Copyright 2017 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.
+
+// aux-build:dylib.rs
+// min-llvm-version 4.0
+
+extern crate dylib;
+
+fn main() {
+    dylib::foo(1);
+}
diff --git a/src/test/run-pass/thin-lto-inlines.rs b/src/test/run-pass/thinlto/thin-lto-inlines.rs
index 3135a682d86..3135a682d86 100644
--- a/src/test/run-pass/thin-lto-inlines.rs
+++ b/src/test/run-pass/thinlto/thin-lto-inlines.rs
diff --git a/src/test/run-pass/thin-lto-inlines2.rs b/src/test/run-pass/thinlto/thin-lto-inlines2.rs
index ed899d2b115..ed899d2b115 100644
--- a/src/test/run-pass/thin-lto-inlines2.rs
+++ b/src/test/run-pass/thinlto/thin-lto-inlines2.rs