diff --git a/src/archive.rs b/src/archive.rs index 19ca3ea7703..49bbc1da606 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -184,15 +184,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> { let (ref src_archive_path, ref mut src_archive) = self.src_archives[archive_index]; let entry = src_archive.jump_to_entry(entry_index).unwrap(); - let orig_header = entry.header(); - - // FIXME implement clone for `ar::Archive`. - let mut header = - ar::Header::new(orig_header.identifier().to_vec(), orig_header.size()); - header.set_mtime(orig_header.mtime()); - header.set_uid(orig_header.uid()); - header.set_gid(orig_header.gid()); - header.set_mode(orig_header.mode()); + let header = entry.header().clone(); match builder { BuilderKind::Bsd(ref mut builder) => { diff --git a/src/base.rs b/src/base.rs index 0161a42a104..4a865fdb731 100644 --- a/src/base.rs +++ b/src/base.rs @@ -432,7 +432,6 @@ fn trans_stmt<'tcx>( UnOp::Not => { match layout.ty.kind { ty::Bool => { - let val = fx.bcx.ins().uextend(types::I32, val); // WORKAROUND for CraneStation/cranelift#466 let res = fx.bcx.ins().icmp_imm(IntCC::Equal, val, 0); CValue::by_val(fx.bcx.ins().bint(types::I8, res), layout) } diff --git a/src/debuginfo/mod.rs b/src/debuginfo/mod.rs index c1fb6c92c31..363abb8cd77 100644 --- a/src/debuginfo/mod.rs +++ b/src/debuginfo/mod.rs @@ -50,7 +50,7 @@ impl<'tcx> DebugContext<'tcx> { // FIXME: how to get version when building out of tree? // Normally this would use option_env!("CFG_VERSION"). - let producer = format!("cranelift fn (rustc version {})", "unknown version"); + let producer = format!("cg_clif (rustc {})", "unknown version"); let comp_dir = tcx.sess.working_dir.0.to_string_lossy().into_owned(); let name = match tcx.sess.local_crate_source_file { Some(ref path) => path.to_string_lossy().into_owned(), diff --git a/src/intrinsics/mod.rs b/src/intrinsics/mod.rs index 24dd7b07d22..2df8948054f 100644 --- a/src/intrinsics/mod.rs +++ b/src/intrinsics/mod.rs @@ -761,6 +761,7 @@ pub fn codegen_intrinsic_call<'tcx>( volatile_load, (c ptr) { // Cranelift treats loads as volatile by default + // FIXME ignore during stack2reg optimization let inner_layout = fx.layout_of(ptr.layout().ty.builtin_deref(true).unwrap().ty); let val = CValue::by_ref(Pointer::new(ptr.load_scalar(fx)), inner_layout); @@ -768,6 +769,7 @@ pub fn codegen_intrinsic_call<'tcx>( }; volatile_store, (v ptr, c val) { // Cranelift treats stores as volatile by default + // FIXME ignore during stack2reg optimization let dest = CPlace::for_ptr(Pointer::new(ptr), val.layout()); dest.write_cvalue(fx, val); };