Remove use of mem::uninitialized in code_gen crate
This commit is contained in:
parent
42c3d37145
commit
7646d4935b
|
@ -170,8 +170,7 @@ impl CodegenCx<'ll, 'tcx> {
|
||||||
pub fn const_get_real(&self, v: &'ll Value) -> Option<(f64, bool)> {
|
pub fn const_get_real(&self, v: &'ll Value) -> Option<(f64, bool)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
if self.is_const_real(v) {
|
if self.is_const_real(v) {
|
||||||
#[allow(deprecated)]
|
let mut loses_info: llvm::Bool = 0;
|
||||||
let mut loses_info: llvm::Bool = ::std::mem::uninitialized();
|
|
||||||
let r = llvm::LLVMConstRealGetDouble(v, &mut loses_info);
|
let r = llvm::LLVMConstRealGetDouble(v, &mut loses_info);
|
||||||
let loses_info = if loses_info == 1 { true } else { false };
|
let loses_info = if loses_info == 1 { true } else { false };
|
||||||
Some((r, loses_info))
|
Some((r, loses_info))
|
||||||
|
|
Loading…
Reference in New Issue