Skip to content

Commit 9176f51

Browse files
committed
Support 128-bit enum variant in debuginfo codegen
1 parent 8430ec5 commit 9176f51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/common.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
108108
self.const_uint(self.type_u64(), i)
109109
}
110110

111+
fn const_u128(&self, i: u128) -> RValue<'gcc> {
112+
self.const_uint_big(self.type_u128(), i)
113+
}
114+
111115
fn const_usize(&self, i: u64) -> RValue<'gcc> {
112116
let bit_size = self.data_layout().pointer_size.bits();
113117
if bit_size < 64 {
@@ -254,7 +258,7 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
254258
// SIMD builtins require a constant value.
255259
self.bitcast_if_needed(value, typ)
256260
}
257-
261+
258262
fn const_ptr_byte_offset(&self, base_addr: Self::Value, offset: abi::Size) -> Self::Value {
259263
self.context.new_array_access(None, base_addr, self.const_usize(offset.bytes())).get_address(None)
260264
}

0 commit comments

Comments
 (0)