about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/driver
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-03 11:00:04 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-11-03 11:00:04 +0100
commit216c4ae46352330bc7962f132fe226a7e73ab8fa (patch)
treec1d7af49fa1f27f325f090cff3f2d8861972fec9 /compiler/rustc_codegen_cranelift/src/driver
parenta6403b0f04b58a35cb9f3e544b2847ee09bcf3a4 (diff)
parent03f01bbe901d60b71cf2c5ec766aef5e532ab79d (diff)
downloadrust-216c4ae46352330bc7962f132fe226a7e73ab8fa.tar.gz
rust-216c4ae46352330bc7962f132fe226a7e73ab8fa.zip
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver')
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/jit.rs4
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/mod.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
index b5bab3d9e1e..3f47df7d844 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
@@ -94,7 +94,7 @@ pub(super) fn run_jit(tcx: TyCtxt<'_>) -> ! {
 
     let args = ::std::env::var("CG_CLIF_JIT_ARGS").unwrap_or_else(|_| String::new());
     let args = std::iter::once(&*tcx.crate_name(LOCAL_CRATE).as_str().to_string())
-        .chain(args.split(" "))
+        .chain(args.split(' '))
         .map(|arg| CString::new(arg).unwrap())
         .collect::<Vec<_>>();
     let mut argv = args.iter().map(|arg| arg.as_ptr()).collect::<Vec<_>>();
@@ -151,7 +151,7 @@ fn load_imported_symbols_for_jit(tcx: TyCtxt<'_>) -> Vec<(String, *const u8)> {
             }
             let dlsym_name = if cfg!(target_os = "macos") {
                 // On macOS `dlsym` expects the name without leading `_`.
-                assert!(name.starts_with("_"), "{:?}", name);
+                assert!(name.starts_with('_'), "{:?}", name);
                 &name[1..]
             } else {
                 &name
diff --git a/compiler/rustc_codegen_cranelift/src/driver/mod.rs b/compiler/rustc_codegen_cranelift/src/driver/mod.rs
index 2fb353ca162..a11dc57ee64 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/mod.rs
@@ -64,11 +64,11 @@ fn codegen_mono_items<'tcx>(
 
     for (mono_item, (linkage, visibility)) in mono_items {
         let linkage = crate::linkage::get_clif_linkage(mono_item, linkage, visibility);
-        trans_mono_item(cx, mono_item, linkage);
+        codegen_mono_item(cx, mono_item, linkage);
     }
 }
 
-fn trans_mono_item<'tcx, M: Module>(
+fn codegen_mono_item<'tcx, M: Module>(
     cx: &mut crate::CodegenCx<'tcx, M>,
     mono_item: MonoItem<'tcx>,
     linkage: Linkage,
@@ -80,7 +80,7 @@ fn trans_mono_item<'tcx, M: Module>(
                 crate::PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name));
             debug_assert!(!inst.substs.needs_infer());
             tcx.sess
-                .time("codegen fn", || crate::base::trans_fn(cx, inst, linkage));
+                .time("codegen fn", || crate::base::codegen_fn(cx, inst, linkage));
         }
         MonoItem::Static(def_id) => {
             crate::constant::codegen_static(&mut cx.constants_cx, def_id);