Skip to content

Commit 659fabd

Browse files
scottmcmRalfJung
andcommitted
Apply suggestions from code review
Co-authored-by: Ralf Jung <[email protected]>
1 parent 4e958a5 commit 659fabd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
11641164
let params = vec![AbiParam::new(fx.pointer_type); 3];
11651165
let returns = vec![AbiParam::new(types::I32)];
11661166
let args = &[lhs_ptr, rhs_ptr, bytes_val];
1167+
// Here we assume that the `memcmp` provided by the target is a NOP for size 0.
11671168
let cmp = fx.lib_call("memcmp", params, returns, args)[0];
11681169
ret.write_cvalue(fx, CValue::by_val(cmp, ret.layout()));
11691170
}

0 commit comments

Comments
 (0)