diff options
| author | kangarooCoder <ksbilodeau07@gmail.com> | 2022-04-05 21:50:12 -0500 |
|---|---|---|
| committer | kangarooCoder <ksbilodeau07@gmail.com> | 2022-04-05 21:50:12 -0500 |
| commit | c62d2106da564d221544119f3c268a6ee756803f (patch) | |
| tree | 7b7da3e0286718320f0793dd2bc07b2a2689782a /compiler/rustc_codegen_llvm/src/debuginfo | |
| parent | 594a2fcc3f405e2c3ee643a1b79defbf5ccb1d1c (diff) | |
| parent | bbe9d27b8ff36da56638aa43d6d0cdfdf89a4e57 (diff) | |
| download | rust-c62d2106da564d221544119f3c268a6ee756803f.tar.gz rust-c62d2106da564d221544119f3c268a6ee756803f.zip | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs index 1eafa9501c4..73e01d0453b 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs @@ -118,7 +118,7 @@ fn tag_base_type<'ll, 'tcx>( Variants::Multiple { tag_encoding: TagEncoding::Niche { .. }, tag, .. } => { // Niche tags are always normalized to unsized integers of the correct size. - match tag.value { + match tag.primitive() { Primitive::Int(t, _) => t, Primitive::F32 => Integer::I32, Primitive::F64 => Integer::I64, @@ -136,7 +136,7 @@ fn tag_base_type<'ll, 'tcx>( Variants::Multiple { tag_encoding: TagEncoding::Direct, tag, .. } => { // Direct tags preserve the sign. - tag.value.to_ty(cx.tcx) + tag.primitive().to_ty(cx.tcx) } } } @@ -425,7 +425,7 @@ fn compute_discriminant_value<'ll, 'tcx>( let value = (variant_index.as_u32() as u128) .wrapping_sub(niche_variants.start().as_u32() as u128) .wrapping_add(niche_start); - let value = tag.value.size(cx).truncate(value); + let value = tag.size(cx).truncate(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. |
