aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/export_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/ssa/export_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/export_test.go32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/cmd/compile/internal/ssa/export_test.go b/src/cmd/compile/internal/ssa/export_test.go
index bfe94ff160..3d142a2272 100644
--- a/src/cmd/compile/internal/ssa/export_test.go
+++ b/src/cmd/compile/internal/ssa/export_test.go
@@ -5,6 +5,7 @@
package ssa
import (
+ "cmd/compile/internal/ir"
"cmd/compile/internal/types"
"cmd/internal/obj"
"cmd/internal/obj/arm64"
@@ -65,36 +66,13 @@ type TestFrontend struct {
ctxt *obj.Link
}
-type TestAuto struct {
- t *types.Type
- s string
-}
-
-func (d *TestAuto) Typ() *types.Type {
- return d.t
-}
-
-func (d *TestAuto) String() string {
- return d.s
-}
-
-func (d *TestAuto) StorageClass() StorageClass {
- return ClassAuto
-}
-
-func (d *TestAuto) IsSynthetic() bool {
- return false
-}
-
-func (d *TestAuto) IsAutoTmp() bool {
- return true
-}
-
func (TestFrontend) StringData(s string) *obj.LSym {
return nil
}
-func (TestFrontend) Auto(pos src.XPos, t *types.Type) GCNode {
- return &TestAuto{t: t, s: "aTestAuto"}
+func (TestFrontend) Auto(pos src.XPos, t *types.Type) *ir.Node {
+ n := ir.NewNameAt(pos, &types.Sym{Name: "aFakeAuto"})
+ n.SetClass(ir.PAUTO)
+ return n
}
func (d TestFrontend) SplitString(s LocalSlot) (LocalSlot, LocalSlot) {
return LocalSlot{N: s.N, Type: testTypes.BytePtr, Off: s.Off}, LocalSlot{N: s.N, Type: testTypes.Int, Off: s.Off + 8}