summaryrefslogtreecommitdiff
path: root/src/passes/Memory64Lowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Memory64Lowering.cpp')
-rw-r--r--src/passes/Memory64Lowering.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/passes/Memory64Lowering.cpp b/src/passes/Memory64Lowering.cpp
index 661d6cdae..194d593d8 100644
--- a/src/passes/Memory64Lowering.cpp
+++ b/src/passes/Memory64Lowering.cpp
@@ -159,6 +159,14 @@ struct Memory64Lowering : public WalkerPass<PostWalker<Memory64Lowering>> {
}
}
}
+
+ void run(Module* module) override {
+ if (!module->features.has(FeatureSet::Memory64)) {
+ return;
+ }
+ super::run(module);
+ module->features.disable(FeatureSet::Memory64);
+ }
};
Pass* createMemory64LoweringPass() { return new Memory64Lowering(); }