Skip to content

Commit 29a4a55

Browse files
committed
Rustfmt
1 parent 53bfc67 commit 29a4a55

File tree

5 files changed

+7
-25
lines changed

5 files changed

+7
-25
lines changed

src/backend.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,8 @@ pub(crate) fn with_object(sess: &Session, name: &str, f: impl FnOnce(&mut Object
142142
}
143143

144144
pub(crate) fn make_module(sess: &Session, isa: Box<dyn TargetIsa>, name: String) -> ObjectModule {
145-
let mut builder = ObjectBuilder::new(
146-
isa,
147-
name + ".o",
148-
cranelift_module::default_libcall_names(),
149-
)
150-
.unwrap();
145+
let mut builder =
146+
ObjectBuilder::new(isa, name + ".o", cranelift_module::default_libcall_names()).unwrap();
151147
// Unlike cg_llvm, cg_clif defaults to disabling -Zfunction-sections. For cg_llvm binary size
152148
// is important, while cg_clif cares more about compilation times. Enabling -Zfunction-sections
153149
// can easily double the amount of time necessary to perform linking.

src/base.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,7 @@ pub(crate) fn codegen_fn<'tcx>(cx: &mut crate::CodegenCx<'_, 'tcx>, instance: In
101101

102102
// Perform rust specific optimizations
103103
tcx.sess.time("optimize clif ir", || {
104-
crate::optimize::optimize_function(
105-
tcx,
106-
instance,
107-
context,
108-
&mut clif_comments,
109-
);
104+
crate::optimize::optimize_function(tcx, instance, context, &mut clif_comments);
110105
});
111106

112107
// If the return block is not reachable, then the SSA builder may have inserted an `iconst.i128`
@@ -351,13 +346,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) {
351346
from_hir_call: _,
352347
} => {
353348
fx.tcx.sess.time("codegen call", || {
354-
crate::abi::codegen_terminator_call(
355-
fx,
356-
*fn_span,
357-
func,
358-
args,
359-
*destination,
360-
)
349+
crate::abi::codegen_terminator_call(fx, *fn_span, func, args, *destination)
361350
});
362351
}
363352
TerminatorKind::InlineAsm {

src/driver/aot.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ pub(super) fn run_aot(
227227
tcx.sess.abort_if_errors();
228228

229229
let isa = crate::build_isa(tcx.sess, &backend_config);
230-
let mut allocator_module = crate::backend::make_module(tcx.sess, isa, "allocator_shim".to_string());
230+
let mut allocator_module =
231+
crate::backend::make_module(tcx.sess, isa, "allocator_shim".to_string());
231232
assert_eq!(pointer_ty(tcx), allocator_module.target_config().pointer_type());
232233
let mut allocator_unwind_context = UnwindContext::new(tcx, allocator_module.isa(), true);
233234
let created_alloc_shim =

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ impl<'m, 'tcx> CodegenCx<'m, 'tcx> {
162162
}
163163
}
164164

165-
166165
pub struct CraneliftCodegenBackend {
167166
pub config: Option<BackendConfig>,
168167
}

src/pretty_clif.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,7 @@ pub(crate) fn write_clif_file<'tcx>(
247247
&mut clif_comments,
248248
&mut clif,
249249
&context.func,
250-
&DisplayFunctionAnnotations {
251-
isa,
252-
value_ranges: value_ranges.as_ref(),
253-
},
250+
&DisplayFunctionAnnotations { isa, value_ranges: value_ranges.as_ref() },
254251
)
255252
.unwrap();
256253

0 commit comments

Comments
 (0)