}
fn const_to_opt_uint(&self, v: &'ll Value) -> Option<u64> {
- try_as_const_integral(v).map(|v| unsafe { llvm::LLVMConstIntGetZExtValue(v) })
+ try_as_const_integral(v).and_then(|v| unsafe {
+ let mut i = 0u64;
+ let success = llvm::LLVMRustConstIntGetZExtValue(v, &mut i);
+ success.then_some(i)
+ })
}
fn const_to_opt_u128(&self, v: &'ll Value, sign_ext: bool) -> Option<u128> {
})
}
- fn zst_to_backend(&self, _llty: &'ll Type) -> &'ll Value {
- self.const_undef(self.type_ix(0))
- }
-
fn scalar_to_backend(&self, cv: Scalar, layout: abi::Scalar, llty: &'ll Type) -> &'ll Value {
let bitsize = if layout.is_bool() { 1 } else { layout.size(self).bits() };
match cv {