Skip to content

Commit 9b2a465

Browse files
committed
Auto merge of #93644 - michaelwoerister:simpler-debuginfo-typemap, r=wesleywiser
debuginfo: Simplify TypeMap used during LLVM debuginfo generation. This PR simplifies the TypeMap that is used in `rustc_codegen_llvm::debuginfo::metadata`. It was unnecessarily complicated because it was originally implemented when types were not yet normalized before codegen. So it did it's own normalization and kept track of multiple unnormalized types being mapped to a single unique id. This PR is based on #93503, which is not merged yet. The PR also removes the arena used for allocating string ids and instead uses `InlinableString` from the [inlinable_string](https://crates.io/crates/inlinable_string) crate. That might not be the best choice, since that crate does not seem to be very actively maintained. The [flexible-string](https://crates.io/crates/flexible-string) crate would be an alternative. r? `@ghost`
2 parents 03c8ffa + bb2059f commit 9b2a465

File tree

6 files changed

+254
-352
lines changed

6 files changed

+254
-352
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -3524,6 +3524,7 @@ dependencies = [
35243524
"rustc_hir",
35253525
"rustc_index",
35263526
"rustc_llvm",
3527+
"rustc_macros",
35273528
"rustc_metadata",
35283529
"rustc_middle",
35293530
"rustc_query_system",

compiler/rustc_codegen_llvm/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ rustc_fs_util = { path = "../rustc_fs_util" }
2525
rustc_hir = { path = "../rustc_hir" }
2626
rustc_index = { path = "../rustc_index" }
2727
rustc_llvm = { path = "../rustc_llvm" }
28+
rustc_macros = { path = "../rustc_macros" }
2829
rustc_metadata = { path = "../rustc_metadata" }
2930
rustc_query_system = { path = "../rustc_query_system" }
3031
rustc_session = { path = "../rustc_session" }

0 commit comments

Comments
 (0)