InterfaceData

This commit is contained in:
xushiwei
2024-05-24 23:06:54 +08:00
parent e6f8cfb16c
commit ab7c828cfa

View File

@@ -369,6 +369,7 @@ func (b Builder) TypeAssert(x Expr, assertedTyp Type, commaOk bool) (ret Expr) {
// -----------------------------------------------------------------------------
/*
// InterfaceData returns the data pointer of an interface.
func (b Builder) InterfaceData(x Expr) Expr {
if debugInstr {
@@ -376,6 +377,7 @@ func (b Builder) InterfaceData(x Expr) Expr {
}
return Expr{b.faceData(x.impl), b.Prog.VoidPtr()}
}
*/
func (b Builder) faceData(x llvm.Value) llvm.Value {
return llvm.CreateExtractValue(b.impl, x, 1)