fix(code fmt): builder.rs & base.rs
This commit is contained in:
parent
6170f48e3f
commit
09fd9087b6
@ -184,8 +184,8 @@ fn module_codegen(tcx: TyCtxt<'_>, (cgu_name, target_info): (Symbol, LockedTarge
|
||||
// wrapper here
|
||||
maybe_create_entry_wrapper::<Builder<'_, '_, '_>>(&cx);
|
||||
|
||||
// FINALIZE debuginfo
|
||||
if cx.sess().opts.debuginfo != DebugInfo::None {
|
||||
// Finalize debuginfo
|
||||
if cx.sess().opts.debuginfo != DebugInfo::None {
|
||||
cx.debuginfo_finalize();
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ fn with_cx(cx: &'a CodegenCx<'gcc, 'tcx>, block: Block<'gcc>) -> Self {
|
||||
cx,
|
||||
block,
|
||||
stack_var_count: Cell::new(0),
|
||||
loc:None
|
||||
loc: None
|
||||
}
|
||||
}
|
||||
|
||||
@ -541,12 +541,7 @@ fn mul(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
|
||||
}
|
||||
|
||||
fn fmul(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
|
||||
let i=a * b;
|
||||
if self.loc.is_some() {
|
||||
#[cfg(feature = "master")]
|
||||
i.set_location(self.loc.clone().unwrap());
|
||||
}
|
||||
i
|
||||
self.cx.context.new_binary_op(self.loc, BinaryOp::Mult, a.get_type(), a, b)
|
||||
}
|
||||
|
||||
fn udiv(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
|
||||
@ -660,13 +655,7 @@ fn and(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
|
||||
}
|
||||
|
||||
fn or(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
|
||||
let ret = self.cx.gcc_or(a, b, self.loc);
|
||||
|
||||
if self.loc.is_some() {
|
||||
#[cfg(feature = "master")]
|
||||
ret.set_location(self.loc.unwrap());
|
||||
}
|
||||
ret
|
||||
self.cx.gcc_or(a, b, self.loc)
|
||||
}
|
||||
|
||||
fn xor(&mut self, a: RValue<'gcc>, b: RValue<'gcc>) -> RValue<'gcc> {
|
||||
|
Loading…
Reference in New Issue
Block a user