diff options
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/decl.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/decl.go b/sys/decl.go index 82f1871e1..af3202ae2 100644 --- a/sys/decl.go +++ b/sys/decl.go @@ -23,6 +23,13 @@ type Type interface { Align() uintptr } +func IsPad(t Type) bool { + if ct, ok := t.(ConstType); ok && ct.IsPad { + return true + } + return false +} + type TypeCommon struct { TypeName string IsOptional bool @@ -313,6 +320,7 @@ type ConstType struct { TypeCommon TypeSize uintptr Val uintptr + IsPad bool } func (t ConstType) Size() uintptr { @@ -654,5 +662,6 @@ func makePad(sz uintptr) Type { TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: sz, Val: 0, + IsPad: true, } } |
