diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/PickLoadSigns.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/passes/PickLoadSigns.cpp b/src/passes/PickLoadSigns.cpp index d30e0a381..587314209 100644 --- a/src/passes/PickLoadSigns.cpp +++ b/src/passes/PickLoadSigns.cpp @@ -45,6 +45,11 @@ struct PickLoadSigns : public WalkerPass<ExpressionStackWalker<PickLoadSigns>> { std::unordered_map<Load*, Index> loads; void doWalkFunction(Function* func) { + if (getModule()->memories.empty()) { + // There can be no loads without a memory. + return; + } + // prepare usages.resize(func->getNumLocals()); // walk |