Commit 024df9f6 authored by Gustavo Niemeyer's avatar Gustavo Niemeyer

cgo: fix definition of opaque types

Fixes #3082.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5683074
parent 0c2f3b7f
...@@ -1164,6 +1164,7 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type { ...@@ -1164,6 +1164,7 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
goIdent[name.Name] = name goIdent[name.Name] = name
switch dt.Kind { switch dt.Kind {
case "union", "class": case "union", "class":
t.Go = c.Opaque(t.Size)
if t.C.Empty() { if t.C.Empty() {
t.C.Set("typeof(unsigned char[%d])", t.Size) t.C.Set("typeof(unsigned char[%d])", t.Size)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment