Skip to content

Commit

Permalink
Auto merge of #93644 - michaelwoerister:simpler-debuginfo-typemap, r=…
Browse files Browse the repository at this point in the history
…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`
  • Loading branch information
bors committed Feb 25, 2022
2 parents 03c8ffa + bb2059f commit 9b2a465
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 352 deletions.
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3524,6 +3524,7 @@ dependencies = [
"rustc_hir",
"rustc_index",
"rustc_llvm",
"rustc_macros",
"rustc_metadata",
"rustc_middle",
"rustc_query_system",
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_llvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rustc_fs_util = { path = "../rustc_fs_util" }
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
rustc_llvm = { path = "../rustc_llvm" }
rustc_macros = { path = "../rustc_macros" }
rustc_metadata = { path = "../rustc_metadata" }
rustc_query_system = { path = "../rustc_query_system" }
rustc_session = { path = "../rustc_session" }
Expand Down
Loading

0 comments on commit 9b2a465

Please sign in to comment.