aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/gc/main.go')
-rw-r--r--src/cmd/compile/internal/gc/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/gc/main.go b/src/cmd/compile/internal/gc/main.go
index 1541bc4285..2903d64ff8 100644
--- a/src/cmd/compile/internal/gc/main.go
+++ b/src/cmd/compile/internal/gc/main.go
@@ -300,9 +300,8 @@ func Main(archInit func(*ssagen.ArchInfo)) {
base.Timer.Start("be", "compilefuncs")
fcount := int64(0)
for i := 0; i < len(typecheck.Target.Decls); i++ {
- n := typecheck.Target.Decls[i]
- if n.Op() == ir.ODCLFUNC {
- funccompile(n.(*ir.Func))
+ if fn, ok := typecheck.Target.Decls[i].(*ir.Func); ok {
+ enqueueFunc(fn)
fcount++
}
}