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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir/names.h b/src/ir/names.h
index 6fbb987f5..94efd91d4 100644
--- a/src/ir/names.h
+++ b/src/ir/names.h
@@ -84,6 +84,11 @@ inline Name getValidEventName(Module& module, Name root) {
return getValidName(
module, root, [&](Name test) { return !module.getEventOrNull(test); });
}
+inline Name getValidElementSegmentName(Module& module, Name root) {
+ return getValidName(module, root, [&](Name test) {
+ return !module.getElementSegmentOrNull(test);
+ });
+}
} // namespace Names