diff options
| author | scottmcm <scottmcm@users.noreply.github.com> | 2023-08-04 06:22:50 +0000 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-08-06 15:47:40 -0700 |
| commit | 659fabde50c185a4ea62aa333b05e313bea247a0 (patch) | |
| tree | cfcfa1dee5ed37ab9307fce78e2175ad0e08b719 | |
| parent | 4e958a532b38a0d504457c40982eb02ec8dc0f4e (diff) | |
| download | rust-659fabde50c185a4ea62aa333b05e313bea247a0.tar.gz rust-659fabde50c185a4ea62aa333b05e313bea247a0.zip | |
Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
| -rw-r--r-- | src/intrinsics/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intrinsics/mod.rs b/src/intrinsics/mod.rs index dcb080b9ec1..36e9ba9c7f8 100644 --- a/src/intrinsics/mod.rs +++ b/src/intrinsics/mod.rs @@ -1164,6 +1164,7 @@ fn codegen_regular_intrinsic_call<'tcx>( let params = vec![AbiParam::new(fx.pointer_type); 3]; let returns = vec![AbiParam::new(types::I32)]; let args = &[lhs_ptr, rhs_ptr, bytes_val]; + // Here we assume that the `memcmp` provided by the target is a NOP for size 0. let cmp = fx.lib_call("memcmp", params, returns, args)[0]; ret.write_cvalue(fx, CValue::by_val(cmp, ret.layout())); } |
