diff options
Diffstat (limited to 'src/wasm-traversal.h')
-rw-r--r-- | src/wasm-traversal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm-traversal.h b/src/wasm-traversal.h index a77356a4c..34e1f9453 100644 --- a/src/wasm-traversal.h +++ b/src/wasm-traversal.h @@ -268,6 +268,7 @@ struct Walker : public VisitorType { // Walks module-level code, that is, code that is not in functions. void walkModuleCode(Module* module) { + setModule(module); // Dispatch statically through the SubType. SubType* self = static_cast<SubType*>(this); for (auto& curr : module->globals) { @@ -283,6 +284,7 @@ struct Walker : public VisitorType { self->walk(item); } } + setModule(nullptr); } // Walk implementation. We don't use recursion as ASTs may be highly |