Skip to content

Commit 878f572

Browse files
committed
fix(comments): Add some info and revert else if
1. Put the `else if` comment in intrinsic/mod.rs away 2. Add TODO to debuginfo.rs in `make_mir_scope()`
1 parent 817d2f2 commit 878f572

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/debuginfo.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ fn make_mir_scope<'gcc, 'tcx>(
137137
// FIXME(eddyb) this doesn't account for the macro-related
138138
// `Span` fixups that `rustc_codegen_ssa::mir::debuginfo` does.
139139

140+
// TODO(tempdragon): Add scope support and then revert to cg_llvm version of this closure
140141
// NOTE: These variables passed () here.
141142
// Changed to comply to clippy.
142143

src/intrinsic/mod.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,16 +308,17 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
308308
self.const_bool(true)
309309
// The else if an immediate neighbor of this block.
310310
// It is moved here to comply to Clippy.
311-
/*else if use_integer_compare {
312-
let integer_ty = self.type_ix(layout.size.bits()); // FIXME(antoyo): LLVM creates an integer of 96 bits for [i32; 3], but gcc doesn't support this, so it creates an integer of 128 bits.
313-
let ptr_ty = self.type_ptr_to(integer_ty);
314-
let a_ptr = self.bitcast(a, ptr_ty);
315-
let a_val = self.load(integer_ty, a_ptr, layout.align.abi);
316-
let b_ptr = self.bitcast(b, ptr_ty);
317-
let b_val = self.load(integer_ty, b_ptr, layout.align.abi);
318-
self.icmp(IntPredicate::IntEQ, a_val, b_val)
319-
}*/
320-
} else {
311+
}
312+
/*else if use_integer_compare {
313+
let integer_ty = self.type_ix(layout.size.bits()); // FIXME(antoyo): LLVM creates an integer of 96 bits for [i32; 3], but gcc doesn't support this, so it creates an integer of 128 bits.
314+
let ptr_ty = self.type_ptr_to(integer_ty);
315+
let a_ptr = self.bitcast(a, ptr_ty);
316+
let a_val = self.load(integer_ty, a_ptr, layout.align.abi);
317+
let b_ptr = self.bitcast(b, ptr_ty);
318+
let b_val = self.load(integer_ty, b_ptr, layout.align.abi);
319+
self.icmp(IntPredicate::IntEQ, a_val, b_val)
320+
}*/
321+
else {
321322
let void_ptr_type = self.context.new_type::<*const ()>();
322323
let a_ptr = self.bitcast(a, void_ptr_type);
323324
let b_ptr = self.bitcast(b, void_ptr_type);

0 commit comments

Comments
 (0)