llgo/ssa: Imethod

This commit is contained in:
xushiwei
2024-05-27 09:46:07 +08:00
parent eba08334d1
commit 8536fe4987
6 changed files with 41 additions and 78 deletions

View File

@@ -132,6 +132,7 @@ type aProgram struct {
anyTy Type
voidTy Type
voidPtr Type
voidPPtr Type
boolTy Type
cstrTy Type
cintTy Type
@@ -371,6 +372,13 @@ func (p Program) VoidPtr() Type {
return p.voidPtr
}
func (p Program) VoidPtrPtr() Type {
if p.voidPPtr == nil {
p.voidPPtr = p.rawType(types.NewPointer(types.Typ[types.UnsafePointer]))
}
return p.voidPPtr
}
// Bool returns bool type.
func (p Program) Bool() Type {
if p.boolTy == nil {