aboutsummaryrefslogtreecommitdiffhomepage
path: root/compiler/map.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/map.go')
-rw-r--r--compiler/map.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/map.go b/compiler/map.go
index c3d428902..21f0ee4a6 100644
--- a/compiler/map.go
+++ b/compiler/map.go
@@ -185,6 +185,11 @@ func (b *builder) createMapDelete(keyType types.Type, m, key llvm.Value, pos tok
}
}
+// Clear the given map.
+func (b *builder) createMapClear(m llvm.Value) {
+ b.createRuntimeCall("hashmapClear", []llvm.Value{m}, "")
+}
+
// createMapIteratorNext lowers the *ssa.Next instruction for iterating over a
// map. It returns a tuple of {bool, key, value} with the result of the
// iteration.