summaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/transform.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2022-05-02 18:02:22 -0700
committerMatthew Dempsky <mdempsky@google.com>2022-05-05 18:48:32 +0000
commit3ffc230a9fb6f2a2326cf64017eaa7cc4582a8d3 (patch)
treeab3b4362773f2ffd4e08817544b60c4b2034922d /src/cmd/compile/internal/noder/transform.go
parenta6a49d128bbd67051c2246fbb9abae85c8601a5d (diff)
downloadgo-git-3ffc230a9fb6f2a2326cf64017eaa7cc4582a8d3.tar.gz
cmd/compile: change ir.NewCompLitExpr from Ntype to *types.Type
All callers were already using TypeNode to get an Ntype anyway, so just push the TypeNode constructor down into NewCompLitExpr. Prep refactoring for next CL to remove the Ntype field. Change-Id: I671935afca707aaab11d1c46e39902bd37a485ba Reviewed-on: https://go-review.googlesource.com/c/go/+/403840 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/transform.go')
-rw-r--r--src/cmd/compile/internal/noder/transform.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/noder/transform.go b/src/cmd/compile/internal/noder/transform.go
index 43fd73fdbc..6b17ab283a 100644
--- a/src/cmd/compile/internal/noder/transform.go
+++ b/src/cmd/compile/internal/noder/transform.go
@@ -74,8 +74,7 @@ func stringtoruneslit(n *ir.ConvExpr) ir.Node {
i++
}
- nn := ir.NewCompLitExpr(base.Pos, ir.OCOMPLIT, ir.TypeNode(n.Type()), nil)
- nn.List = list
+ nn := ir.NewCompLitExpr(base.Pos, ir.OCOMPLIT, n.Type(), list)
typed(n.Type(), nn)
// Need to transform the OCOMPLIT.
return transformCompLit(nn)