Really make CGU names unique across crates.

This commit is contained in:
Michael Woerister 2018-09-12 12:46:48 +02:00
parent a2b991b530
commit 3beb762dcf
6 changed files with 44 additions and 19 deletions

View file

@ -58,5 +58,5 @@ mod mod3 {
// Make sure the two generic functions from the extern crate get instantiated
// once for the current crate
//~ MONO_ITEM fn cgu_generic_function::foo[0]<&str> @@ cgu_generic_function.volatile[External]
//~ MONO_ITEM fn cgu_generic_function::bar[0]<&str> @@ cgu_generic_function.volatile[External]
//~ MONO_ITEM fn cgu_generic_function::foo[0]<&str> @@ cgu_generic_function-in-extern_generic.volatile[External]
//~ MONO_ITEM fn cgu_generic_function::bar[0]<&str> @@ cgu_generic_function-in-extern_generic.volatile[External]

View file

@ -19,7 +19,7 @@ extern crate shared_generics_aux;
//~ MONO_ITEM fn shared_generics::foo[0]
pub fn foo() {
//~ MONO_ITEM fn shared_generics_aux::generic_fn[0]<u16> @@ shared_generics_aux.volatile[External]
//~ MONO_ITEM fn shared_generics_aux::generic_fn[0]<u16> @@ shared_generics_aux-in-shared_generics.volatile[External]
let _ = shared_generics_aux::generic_fn(0u16, 1u16);
// This should not generate a monomorphization because it's already