Skip to content

Commit b132a7e

Browse files
scottmcmRalfJung
andcommitted
Apply suggestions from code review
Co-authored-by: Ralf Jung <[email protected]>
1 parent 9c8ae2f commit b132a7e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: src/intrinsic/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
311311
let a_ptr = self.bitcast(a, void_ptr_type);
312312
let b_ptr = self.bitcast(b, void_ptr_type);
313313

314+
// Here we assume that the `memcmp` provided by the target is a NOP for size 0.
314315
let builtin = self.context.get_builtin_function("memcmp");
315316
let cmp = self.context.new_call(None, builtin, &[a_ptr, b_ptr, n]);
316317
self.sext(cmp, self.type_ix(32))

0 commit comments

Comments
 (0)