From 7a7c747c6f5f732d614cea2404386913e68981a0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 23 Feb 2018 13:43:43 +0100 Subject: pkg/compiler: allow unions as syscall arguments If all union options can be syscall arguments, allow the union itself as syscall argument. --- prog/encodingexec.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'prog/encodingexec.go') diff --git a/prog/encodingexec.go b/prog/encodingexec.go index 27fa63350..8ecec3a03 100644 --- a/prog/encodingexec.go +++ b/prog/encodingexec.go @@ -264,6 +264,8 @@ func (w *execContext) writeArg(arg Arg) { copy(w.buf, data) w.buf = w.buf[padded:] } + case *UnionArg: + w.writeArg(a.Option) default: panic("unknown arg type") } -- cgit mrf-deployment