Skip to content

Commit 88dc58f

Browse files
committed
Revert "cg_llvm: fewer_names in uncached_llvm_type"
This reverts commit fa01ce8.
1 parent caeb333 commit 88dc58f

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

compiler/rustc_codegen_llvm/src/type_of.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ fn uncached_llvm_type<'a, 'tcx>(
4040
// FIXME(eddyb) producing readable type names for trait objects can result
4141
// in problematically distinct types due to HRTB and subtyping (see #47638).
4242
// ty::Dynamic(..) |
43-
ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str
44-
if !cx.sess().fewer_names() =>
45-
{
43+
ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str => {
4644
let mut name = with_no_trimmed_paths(|| layout.ty.to_string());
4745
if let (&ty::Adt(def, _), &Variants::Single { index }) =
4846
(layout.ty.kind(), &layout.variants)
@@ -58,12 +56,6 @@ fn uncached_llvm_type<'a, 'tcx>(
5856
}
5957
Some(name)
6058
}
61-
ty::Adt(..) => {
62-
// If `Some` is returned then a named struct is created in LLVM. Name collisions are
63-
// avoided by LLVM (with increasing suffixes). If rustc doesn't generate names then that
64-
// can improve perf.
65-
Some(String::new())
66-
}
6759
_ => None,
6860
};
6961

src/test/ui/issues/issue-75763.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// build-pass
1+
// ignore-test
2+
// FIXME(const_generics): This test causes an ICE after reverting #76030.
23

34
#![allow(incomplete_features)]
45
#![feature(const_generics)]

0 commit comments

Comments
 (0)