Revert "cg_llvm: fewer_names
in uncached_llvm_type
"
This reverts commit fa01ce802f
.
This commit is contained in:
parent
caeb3335c0
commit
88dc58fc9b
2 changed files with 3 additions and 10 deletions
|
@ -40,9 +40,7 @@ fn uncached_llvm_type<'a, 'tcx>(
|
||||||
// FIXME(eddyb) producing readable type names for trait objects can result
|
// FIXME(eddyb) producing readable type names for trait objects can result
|
||||||
// in problematically distinct types due to HRTB and subtyping (see #47638).
|
// in problematically distinct types due to HRTB and subtyping (see #47638).
|
||||||
// ty::Dynamic(..) |
|
// ty::Dynamic(..) |
|
||||||
ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str
|
ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str => {
|
||||||
if !cx.sess().fewer_names() =>
|
|
||||||
{
|
|
||||||
let mut name = with_no_trimmed_paths(|| layout.ty.to_string());
|
let mut name = with_no_trimmed_paths(|| layout.ty.to_string());
|
||||||
if let (&ty::Adt(def, _), &Variants::Single { index }) =
|
if let (&ty::Adt(def, _), &Variants::Single { index }) =
|
||||||
(layout.ty.kind(), &layout.variants)
|
(layout.ty.kind(), &layout.variants)
|
||||||
|
@ -58,12 +56,6 @@ fn uncached_llvm_type<'a, 'tcx>(
|
||||||
}
|
}
|
||||||
Some(name)
|
Some(name)
|
||||||
}
|
}
|
||||||
ty::Adt(..) => {
|
|
||||||
// If `Some` is returned then a named struct is created in LLVM. Name collisions are
|
|
||||||
// avoided by LLVM (with increasing suffixes). If rustc doesn't generate names then that
|
|
||||||
// can improve perf.
|
|
||||||
Some(String::new())
|
|
||||||
}
|
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// build-pass
|
// ignore-test
|
||||||
|
// FIXME(const_generics): This test causes an ICE after reverting #76030.
|
||||||
|
|
||||||
#![allow(incomplete_features)]
|
#![allow(incomplete_features)]
|
||||||
#![feature(const_generics)]
|
#![feature(const_generics)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue