summaryrefslogtreecommitdiff
path: root/src/ir/memory-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/memory-utils.h')
-rw-r--r--src/ir/memory-utils.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ir/memory-utils.h b/src/ir/memory-utils.h
index c8f39a2ec..ea19ca799 100644
--- a/src/ir/memory-utils.h
+++ b/src/ir/memory-utils.h
@@ -31,6 +31,9 @@ namespace MemoryUtils {
if (memory.segments.size() == 0) return true;
std::vector<char> data;
for (auto& segment : memory.segments) {
+ if (segment.isPassive) {
+ return false;
+ }
auto* offset = segment.offset->dynCast<Const>();
if (!offset) return false;
}
@@ -61,4 +64,3 @@ namespace MemoryUtils {
} // namespace wasm
#endif // wasm_ir_memory_h
-