summaryrefslogtreecommitdiff
path: root/src/ir/names.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/names.h')
-rw-r--r--src/ir/names.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/names.h b/src/ir/names.h
index 4bdfacb1e..b2165c2c2 100644
--- a/src/ir/names.h
+++ b/src/ir/names.h
@@ -83,6 +83,10 @@ inline Name getValidElementSegmentName(Module& module, Name root) {
return getValidName(
root, [&](Name test) { return !module.getElementSegmentOrNull(test); });
}
+inline Name getValidMemoryName(Module& module, Name root) {
+ return getValidName(root,
+ [&](Name test) { return !module.getMemoryOrNull(test); });
+}
inline Name getValidLocalName(Function& func, Name root) {
return getValidName(root,
[&](Name test) { return !func.hasLocalIndex(test); });