Skip to content

Commit

Permalink
cmd/compile: use types2.Sizes instead of compiler own implementation
Browse files Browse the repository at this point in the history
With #61035 fixed, types2.Sizes matches the compiler behavior, so use its
Sizes implementation instead of rolling our own copy.

Updates #61035

Change-Id: I7b9efd27a01f729a04c79cd6b4ee5f417fe6e664
Reviewed-on: https://go-review.googlesource.com/c/go/+/506716
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
  • Loading branch information
cuonglm authored and gopherbot committed Aug 16, 2023
1 parent 5fa4aac commit 14a3ffc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 186 deletions.
3 changes: 2 additions & 1 deletion src/cmd/compile/internal/noder/irgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package noder

import (
"fmt"
"internal/buildcfg"
"internal/types/errors"
"regexp"
"sort"
Expand Down Expand Up @@ -51,7 +52,7 @@ func checkFiles(m posMap, noders []*noder) (*types2.Package, *types2.Info) {
base.ErrorfAt(m.makeXPos(terr.Pos), terr.Code, "%s", msg)
},
Importer: &importer,
Sizes: &gcSizes{},
Sizes: types2.SizesFor("gc", buildcfg.GOARCH),
}
if base.Flag.ErrorURL {
conf.ErrorURL = " [go.dev/e/%s]"
Expand Down
185 changes: 0 additions & 185 deletions src/cmd/compile/internal/noder/sizes.go

This file was deleted.

0 comments on commit 14a3ffc

Please sign in to comment.