diff options
| author | bors <bors@rust-lang.org> | 2025-02-14 03:19:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-14 03:19:52 +0000 |
| commit | 6dfeab5c9e8a17a6636c1479037baabc4b1e9562 (patch) | |
| tree | f1e47d108d2b7e8f8f40f77cf180d65279ba6edb /compiler/rustc_codegen_llvm | |
| parent | a567209daab72b7ea59eac533278064396bb0534 (diff) | |
| parent | 6eb39294d1eac1178a66c129c55e7ff908ff72c9 (diff) | |
| download | rust-6dfeab5c9e8a17a6636c1479037baabc4b1e9562.tar.gz rust-6dfeab5c9e8a17a6636c1479037baabc4b1e9562.zip | |
Auto merge of #137001 - workingjubilee:rollup-u3dn4gc, r=workingjubilee
Rollup of 11 pull requests Successful merges: - #136863 (rework rigid alias handling ) - #136869 (Fix diagnostic when using = instead of : in let binding) - #136895 (debuginfo: Set bitwidth appropriately in enum variant tags) - #136928 (eagerly prove WF when resolving fully qualified paths) - #136941 (Move `llvm.ccache` to `build.ccache`) - #136950 (rustdoc: use better, consistent SVG icons for scraped examples) - #136957 (coverage: Eliminate more counters by giving them to unreachable nodes) - #136960 (Compiletest should not inherit all host RUSTFLAGS) - #136962 (unify LLVM version finding logic) - #136970 (ci: move `x86_64-gnu-debug` job to the free runner) - #136973 (Fix `x test --stage 1 ui-fulldeps` on macOS (until the next beta bump)) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs index 11824398f24..187d97c54c8 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs @@ -437,6 +437,12 @@ fn build_enum_variant_member_di_node<'ll, 'tcx>( .source_info .unwrap_or_else(|| (unknown_file_metadata(cx), UNKNOWN_LINE_NUMBER)); + let discr = discr_value.opt_single_val().map(|value| { + let tag_base_type = tag_base_type(cx.tcx, enum_type_and_layout); + let size = cx.size_of(tag_base_type); + cx.const_uint_big(cx.type_ix(size.bits()), value) + }); + unsafe { llvm::LLVMRustDIBuilderCreateVariantMemberType( DIB(cx), @@ -448,7 +454,7 @@ fn build_enum_variant_member_di_node<'ll, 'tcx>( enum_type_and_layout.size.bits(), enum_type_and_layout.align.abi.bits() as u32, Size::ZERO.bits(), - discr_value.opt_single_val().map(|value| cx.const_u128(value)), + discr, DIFlags::FlagZero, variant_member_info.variant_struct_type_di_node, ) |
