Update codegen-unit tests.

This commit is contained in:
Michael Woerister 2017-10-27 14:31:18 +02:00
parent b61ee5180c
commit 7bb9353dd5
7 changed files with 47 additions and 47 deletions

View File

@ -16,7 +16,7 @@
// compile-flags:-Zinline-in-all-cgus // compile-flags:-Zinline-in-all-cgus
#![allow(dead_code)] #![allow(dead_code)]
#![crate_type="lib"] #![crate_type="rlib"]
// aux-build:cgu_extern_drop_glue.rs // aux-build:cgu_extern_drop_glue.rs
extern crate cgu_extern_drop_glue; extern crate cgu_extern_drop_glue;
@ -25,20 +25,20 @@ extern crate cgu_extern_drop_glue;
struct LocalStruct(cgu_extern_drop_glue::Struct); struct LocalStruct(cgu_extern_drop_glue::Struct);
//~ TRANS_ITEM fn extern_drop_glue::user[0] @@ extern_drop_glue[Internal] //~ TRANS_ITEM fn extern_drop_glue::user[0] @@ extern_drop_glue[External]
fn user() pub fn user()
{ {
//~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::LocalStruct[0]> @@ extern_drop_glue[Internal] //~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::LocalStruct[0]> @@ extern_drop_glue[Internal]
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0)); let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
} }
mod mod1 { pub mod mod1 {
use cgu_extern_drop_glue; use cgu_extern_drop_glue;
struct LocalStruct(cgu_extern_drop_glue::Struct); struct LocalStruct(cgu_extern_drop_glue::Struct);
//~ TRANS_ITEM fn extern_drop_glue::mod1[0]::user[0] @@ extern_drop_glue-mod1[Internal] //~ TRANS_ITEM fn extern_drop_glue::mod1[0]::user[0] @@ extern_drop_glue-mod1[External]
fn user() pub fn user()
{ {
//~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::mod1[0]::LocalStruct[0]> @@ extern_drop_glue-mod1[Internal] //~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<extern_drop_glue::mod1[0]::LocalStruct[0]> @@ extern_drop_glue-mod1[Internal]
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0)); let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));

View File

@ -35,10 +35,10 @@ pub fn user()
cgu_explicit_inlining::never_inlined(); cgu_explicit_inlining::never_inlined();
} }
mod mod1 { pub mod mod1 {
use cgu_explicit_inlining; use cgu_explicit_inlining;
//~ TRANS_ITEM fn inlining_from_extern_crate::mod1[0]::user[0] @@ inlining_from_extern_crate-mod1[Internal] //~ TRANS_ITEM fn inlining_from_extern_crate::mod1[0]::user[0] @@ inlining_from_extern_crate-mod1[External]
pub fn user() pub fn user()
{ {
cgu_explicit_inlining::inlined(); cgu_explicit_inlining::inlined();
@ -48,10 +48,10 @@ mod mod1 {
} }
} }
mod mod2 { pub mod mod2 {
use cgu_explicit_inlining; use cgu_explicit_inlining;
//~ TRANS_ITEM fn inlining_from_extern_crate::mod2[0]::user[0] @@ inlining_from_extern_crate-mod2[Internal] //~ TRANS_ITEM fn inlining_from_extern_crate::mod2[0]::user[0] @@ inlining_from_extern_crate-mod2[External]
pub fn user() pub fn user()
{ {
cgu_explicit_inlining::always_inlined(); cgu_explicit_inlining::always_inlined();

View File

@ -15,7 +15,7 @@
// compile-flags:-Zinline-in-all-cgus // compile-flags:-Zinline-in-all-cgus
#![allow(dead_code)] #![allow(dead_code)]
#![crate_type="lib"] #![crate_type="rlib"]
//~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Struct[0]> @@ local_drop_glue[Internal] local_drop_glue-mod1[Internal] //~ TRANS_ITEM fn core::ptr[0]::drop_in_place[0]<local_drop_glue::Struct[0]> @@ local_drop_glue[Internal] local_drop_glue-mod1[Internal]
struct Struct { struct Struct {
@ -32,8 +32,8 @@ struct Outer {
_a: Struct _a: Struct
} }
//~ TRANS_ITEM fn local_drop_glue::user[0] @@ local_drop_glue[Internal] //~ TRANS_ITEM fn local_drop_glue::user[0] @@ local_drop_glue[External]
fn user() pub fn user()
{ {
let _ = Outer { let _ = Outer {
_a: Struct { _a: Struct {
@ -42,7 +42,7 @@ fn user()
}; };
} }
mod mod1 pub mod mod1
{ {
use super::Struct; use super::Struct;
@ -53,8 +53,8 @@ mod mod1
_b: (u32, Struct), _b: (u32, Struct),
} }
//~ TRANS_ITEM fn local_drop_glue::mod1[0]::user[0] @@ local_drop_glue-mod1[Internal] //~ TRANS_ITEM fn local_drop_glue::mod1[0]::user[0] @@ local_drop_glue-mod1[External]
fn user() pub fn user()
{ {
let _ = Struct2 { let _ = Struct2 {
_a: Struct { _a: 0 }, _a: Struct { _a: 0 },

View File

@ -27,28 +27,28 @@ mod inline {
} }
} }
mod user1 { pub mod user1 {
use super::inline; use super::inline;
//~ TRANS_ITEM fn local_inlining_but_not_all::user1[0]::foo[0] @@ local_inlining_but_not_all-user1[Internal] //~ TRANS_ITEM fn local_inlining_but_not_all::user1[0]::foo[0] @@ local_inlining_but_not_all-user1[External]
fn foo() { pub fn foo() {
inline::inlined_function(); inline::inlined_function();
} }
} }
mod user2 { pub mod user2 {
use super::inline; use super::inline;
//~ TRANS_ITEM fn local_inlining_but_not_all::user2[0]::bar[0] @@ local_inlining_but_not_all-user2[Internal] //~ TRANS_ITEM fn local_inlining_but_not_all::user2[0]::bar[0] @@ local_inlining_but_not_all-user2[External]
fn bar() { pub fn bar() {
inline::inlined_function(); inline::inlined_function();
} }
} }
mod non_user { pub mod non_user {
//~ TRANS_ITEM fn local_inlining_but_not_all::non_user[0]::baz[0] @@ local_inlining_but_not_all-non_user[Internal] //~ TRANS_ITEM fn local_inlining_but_not_all::non_user[0]::baz[0] @@ local_inlining_but_not_all-non_user[External]
fn baz() { pub fn baz() {
} }
} }

View File

@ -28,28 +28,28 @@ mod inline {
} }
} }
mod user1 { pub mod user1 {
use super::inline; use super::inline;
//~ TRANS_ITEM fn local_inlining::user1[0]::foo[0] @@ local_inlining-user1[Internal] //~ TRANS_ITEM fn local_inlining::user1[0]::foo[0] @@ local_inlining-user1[External]
fn foo() { pub fn foo() {
inline::inlined_function(); inline::inlined_function();
} }
} }
mod user2 { pub mod user2 {
use super::inline; use super::inline;
//~ TRANS_ITEM fn local_inlining::user2[0]::bar[0] @@ local_inlining-user2[Internal] //~ TRANS_ITEM fn local_inlining::user2[0]::bar[0] @@ local_inlining-user2[External]
fn bar() { pub fn bar() {
inline::inlined_function(); inline::inlined_function();
} }
} }
mod non_user { pub mod non_user {
//~ TRANS_ITEM fn local_inlining::non_user[0]::baz[0] @@ local_inlining-non_user[Internal] //~ TRANS_ITEM fn local_inlining::non_user[0]::baz[0] @@ local_inlining-non_user[External]
fn baz() { pub fn baz() {
} }
} }

View File

@ -15,7 +15,7 @@
// compile-flags:-Zinline-in-all-cgus // compile-flags:-Zinline-in-all-cgus
#![allow(dead_code)] #![allow(dead_code)]
#![crate_type="lib"] #![crate_type="rlib"]
mod inline { mod inline {
@ -37,19 +37,19 @@ mod direct_user {
} }
} }
mod indirect_user { pub mod indirect_user {
use super::direct_user; use super::direct_user;
//~ TRANS_ITEM fn local_transitive_inlining::indirect_user[0]::bar[0] @@ local_transitive_inlining-indirect_user[Internal] //~ TRANS_ITEM fn local_transitive_inlining::indirect_user[0]::bar[0] @@ local_transitive_inlining-indirect_user[External]
fn bar() { pub fn bar() {
direct_user::foo(); direct_user::foo();
} }
} }
mod non_user { pub mod non_user {
//~ TRANS_ITEM fn local_transitive_inlining::non_user[0]::baz[0] @@ local_transitive_inlining-non_user[Internal] //~ TRANS_ITEM fn local_transitive_inlining::non_user[0]::baz[0] @@ local_transitive_inlining-non_user[External]
fn baz() { pub fn baz() {
} }
} }

View File

@ -13,7 +13,7 @@
// incremental compilation // incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/statics // compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/statics
#![crate_type="lib"] #![crate_type="rlib"]
//~ TRANS_ITEM static statics::FOO[0] @@ statics[Internal] //~ TRANS_ITEM static statics::FOO[0] @@ statics[Internal]
static FOO: u32 = 0; static FOO: u32 = 0;
@ -21,8 +21,8 @@ static FOO: u32 = 0;
//~ TRANS_ITEM static statics::BAR[0] @@ statics[Internal] //~ TRANS_ITEM static statics::BAR[0] @@ statics[Internal]
static BAR: u32 = 0; static BAR: u32 = 0;
//~ TRANS_ITEM fn statics::function[0] @@ statics[Internal] //~ TRANS_ITEM fn statics::function[0] @@ statics[External]
fn function() { pub fn function() {
//~ TRANS_ITEM static statics::function[0]::FOO[0] @@ statics[Internal] //~ TRANS_ITEM static statics::function[0]::FOO[0] @@ statics[Internal]
static FOO: u32 = 0; static FOO: u32 = 0;
@ -30,15 +30,15 @@ fn function() {
static BAR: u32 = 0; static BAR: u32 = 0;
} }
mod mod1 { pub mod mod1 {
//~ TRANS_ITEM static statics::mod1[0]::FOO[0] @@ statics-mod1[Internal] //~ TRANS_ITEM static statics::mod1[0]::FOO[0] @@ statics-mod1[Internal]
static FOO: u32 = 0; static FOO: u32 = 0;
//~ TRANS_ITEM static statics::mod1[0]::BAR[0] @@ statics-mod1[Internal] //~ TRANS_ITEM static statics::mod1[0]::BAR[0] @@ statics-mod1[Internal]
static BAR: u32 = 0; static BAR: u32 = 0;
//~ TRANS_ITEM fn statics::mod1[0]::function[0] @@ statics-mod1[Internal] //~ TRANS_ITEM fn statics::mod1[0]::function[0] @@ statics-mod1[External]
fn function() { pub fn function() {
//~ TRANS_ITEM static statics::mod1[0]::function[0]::FOO[0] @@ statics-mod1[Internal] //~ TRANS_ITEM static statics::mod1[0]::function[0]::FOO[0] @@ statics-mod1[Internal]
static FOO: u32 = 0; static FOO: u32 = 0;