about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto/auxiliary
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-10-11 11:19:59 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-10-15 08:41:26 -0700
commit2e1c4cd0f51c28b8cfc003fda67f6641bb4335f2 (patch)
treef0b63eee8bac2ec6f6502032c15732ede340d22b /src/test/run-pass/thinlto/auxiliary
parentdf095cefe28f9fc781e8da02f655903600343506 (diff)
downloadrust-2e1c4cd0f51c28b8cfc003fda67f6641bb4335f2.tar.gz
rust-2e1c4cd0f51c28b8cfc003fda67f6641bb4335f2.zip
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/run-pass/thinlto/auxiliary')
-rw-r--r--src/test/run-pass/thinlto/auxiliary/dylib.rs16
-rw-r--r--src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs17
2 files changed, 33 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/thinlto/auxiliary/thin-lto-inlines-aux.rs b/src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs
new file mode 100644
index 00000000000..ccbb0e7a718
--- /dev/null
+++ b/src/test/run-pass/thinlto/auxiliary/thin-lto-inlines-aux.rs
@@ -0,0 +1,17 @@
+// 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.
+
+// no-prefer-dynamic
+
+#![crate_type = "rlib"]
+
+pub fn bar() -> u32 {
+    3
+}