diff options
| author | apocelipes <seve3r@outlook.com> | 2025-04-17 07:49:35 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-04-18 04:21:12 -0700 |
| commit | 8a8efafa8835b646955dd46f4f466d3126e56200 (patch) | |
| tree | 8e289a65b22c8fbf9c98cbbfa7b4321f0162b304 /src/cmd/compile/internal/reflectdata | |
| parent | b89988c5ca47a6a2022db689fa882134397d0f32 (diff) | |
| download | go-8a8efafa8835b646955dd46f4f466d3126e56200.tar.xz | |
cmd/compile: use the builtin clear
To simplify the code a bit.
Change-Id: Ia72f576de59ff161ec389a4992bb635f89783540
GitHub-Last-Rev: eaec8216be964418a085649fcca53a042f28ce1a
GitHub-Pull-Request: golang/go#73411
Reviewed-on: https://go-review.googlesource.com/c/go/+/666117
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/reflectdata')
| -rw-r--r-- | src/cmd/compile/internal/reflectdata/reflect.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/reflectdata/reflect.go b/src/cmd/compile/internal/reflectdata/reflect.go index 4202ff3358..fb60569670 100644 --- a/src/cmd/compile/internal/reflectdata/reflect.go +++ b/src/cmd/compile/internal/reflectdata/reflect.go @@ -1284,9 +1284,7 @@ func dgcptrmask(t *types.Type, write bool) *obj.LSym { // word offsets in t that hold pointers. // ptrmask is assumed to fit at least types.PtrDataSize(t)/PtrSize bits. func fillptrmask(t *types.Type, ptrmask []byte) { - for i := range ptrmask { - ptrmask[i] = 0 - } + clear(ptrmask) if !t.HasPointers() { return } |
