about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-03-05 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-03-05 20:13:01 +0100
commitebd941b890e4731aed0ea1f76f056c8a6394f251 (patch)
tree0c3f1d78fda229b9677107a1538599863a21af2e /src/librustc_codegen_llvm/debuginfo
parente54a16cffce0ecea2954b5af51247f7b4179900b (diff)
downloadrust-ebd941b890e4731aed0ea1f76f056c8a6394f251.tar.gz
rust-ebd941b890e4731aed0ea1f76f056c8a6394f251.zip
debuginfo: Generators use u32 as discriminant type repr
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/metadata.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
index 7beaf134e6b..095330a2e4b 100644
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -1802,9 +1802,9 @@ fn prepare_enum_metadata(
                             DIB(cx),
                             name.as_ptr().cast(),
                             name.len(),
-                            // FIXME: what if enumeration has i128 discriminant?
-                            variant_index.as_usize() as i64,
-                            false, // FIXME: IsUnsigned.
+                            // Generators use u32 as discriminant type.
+                            variant_index.as_u32().into(),
+                            true, // IsUnsigned
                         ))
                     }
                 })