Skip to content

Commit 1954756

Browse files
committed
Auto merge of rust-lang#80122 - davidtwco:revert-76030, r=oli-obk
Revert "cg_llvm: `fewer_names` in `uncached_llvm_type`" Fixes rust-lang#76213 and fixes rust-lang#79564. This PR temporarily reverts commit fa01ce8 from rust-lang#76030 to until the root issue can be resolved. Requested [in t-compiler meeting](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.20meeting.5D.202020-12-17.20.2354818/near/220261541). *Note*: I was seeing some failing debuginfo-gdb tests locally but I wasn't sure if they were spurious.
2 parents eb4fc71 + 88dc58f commit 1954756

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)