about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/debuginfo/metadata
diff options
context:
space:
mode:
authorDonoughLiu <ldm2993593805@163.com>2023-06-10 03:21:39 +0800
committerDonoughLiu <ldm2993593805@163.com>2023-06-10 03:39:24 +0800
commit204bfb6a8c1f9aaa9b5c04d72a47f7fd8772a4bb (patch)
treef0b12fd79eb83e8cd45f5401c4357d7e01e7c4f4 /compiler/rustc_codegen_llvm/src/debuginfo/metadata
parent397641f3bd4f4211d0a1e9ada8d477bf495735b2 (diff)
Support 128-bit enum variant in debuginfo codegen
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/metadata')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs8
1 files changed, 1 insertions, 7 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 978141917c6..666b9762f5a 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native.rs
@@ -412,13 +412,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| {
-                // NOTE(eddyb) do *NOT* remove this assert, until
-                // we pass the full 128-bit value to LLVM, otherwise
-                // truncation will be silent and remain undetected.
-                assert_eq!(value as u64 as u128, value);
-                cx.const_u64(value as u64)
-            }),
+            discr_value.opt_single_val().map(|value| cx.const_u128(value)),
             DIFlags::FlagZero,
             variant_member_info.variant_struct_type_di_node,
         )