diff options
Diffstat (limited to 'src/ir/names.h')
-rw-r--r-- | src/ir/names.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/names.h b/src/ir/names.h index a725c515a..99dd3cab7 100644 --- a/src/ir/names.h +++ b/src/ir/names.h @@ -64,6 +64,10 @@ getValidName(Module& module, Name root, std::function<bool(Name)> check) { } } +inline Name getValidExportName(Module& module, Name root) { + return getValidName( + module, root, [&](Name test) { return !module.getExportOrNull(test); }); +} inline Name getValidGlobalName(Module& module, Name root) { return getValidName( module, root, [&](Name test) { return !module.getGlobalOrNull(test); }); |