summaryrefslogtreecommitdiff
path: root/src/passes/FuncCastEmulation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/FuncCastEmulation.cpp')
-rw-r--r--src/passes/FuncCastEmulation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/passes/FuncCastEmulation.cpp b/src/passes/FuncCastEmulation.cpp
index 3255208fe..23eb98a8c 100644
--- a/src/passes/FuncCastEmulation.cpp
+++ b/src/passes/FuncCastEmulation.cpp
@@ -151,6 +151,11 @@ private:
};
struct FuncCastEmulation : public Pass {
+ // Changes the ABI, which alters which indirect calls will trap (normally,
+ // this should prevent traps, but it depends on code this is linked to at
+ // runtime in the case of dynamic linking etc.).
+ bool addsEffects() override { return true; }
+
void run(Module* module) override {
Index numParams = std::stoul(
getPassOptions().getArgumentOrDefault("max-func-params", "16"));