diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h index db0abcba7..df42951d4 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -890,6 +890,21 @@ public: decIndent(o, indent); return o << '\n'; } + + bool validate() { + for (auto& exp : exports) { + Name name = exp.name; + bool found = false; + for (auto& func : functions) { + if (func->name == name) { + found = true; + break; + } + } + if (!found) return false; + } + return true; + } }; // |