diff options
Diffstat (limited to 'src/ir/global-utils.h')
-rw-r--r-- | src/ir/global-utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ir/global-utils.h b/src/ir/global-utils.h index 93e5c8a67..e096aec8c 100644 --- a/src/ir/global-utils.h +++ b/src/ir/global-utils.h @@ -52,6 +52,12 @@ getGlobalInitializedToImport(Module& wasm, Name module, Name base) { }); return ret; } + +inline bool canInitializeGlobal(const Expression* curr) { + return curr->is<Const>() || curr->is<RefNull>() || curr->is<RefFunc>() || + curr->is<GlobalGet>(); +} + } // namespace GlobalUtils } // namespace wasm |