func (tm *llvmTypeMap) interfaceLLVMType(i *types.Interface, name string) llvm.Type { if typ, ok := tm.types.At(i).(llvm.Type); ok { return typ } // interface{} is represented as {type, value}, // and non-empty interfaces are represented as {itab, value}. i8ptr := llvm.PointerType(llvm.Int8Type(), 0) rtypeType := i8ptr valueType := i8ptr if name == "" { name = i.String() } typ := llvm.GlobalContext().StructCreateNamed(name) typ.StructSetBody([]llvm.Type{rtypeType, valueType}, false) return typ }