mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
compiler: implement clear builtin for maps
This commit is contained in:
committed by
Ron Evans
parent
a2f886a67a
commit
f1e25a18d2
@@ -1631,6 +1631,10 @@ func (b *builder) createBuiltin(argTypes []types.Type, argValues []llvm.Value, c
|
||||
}, "")
|
||||
call.AddCallSiteAttribute(1, b.ctx.CreateEnumAttribute(llvm.AttributeKindID("align"), uint64(elementAlign)))
|
||||
|
||||
return llvm.Value{}, nil
|
||||
case *types.Map:
|
||||
m := argValues[0]
|
||||
b.createMapClear(m)
|
||||
return llvm.Value{}, nil
|
||||
default:
|
||||
return llvm.Value{}, b.makeError(pos, "unsupported type in clear builtin: "+typ.String())
|
||||
|
||||
Reference in New Issue
Block a user