Fix some FIXME's and add some new FIXME's

This commit is contained in:
bjorn3 2020-03-21 16:52:02 +01:00
parent e9db3e7817
commit 6b30d508f7
4 changed files with 4 additions and 11 deletions

View File

@ -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) => {

View File

@ -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)
}

View File

@ -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(),

View File

@ -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);
};