summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-10-29 19:06:28 -0700
committerGitHub <noreply@github.com>2020-10-29 19:06:28 -0700
commit25e47f2c3e7ca8151377075432b34c95073acaca (patch)
treeb806914422484795822dd9235dc22de89bb52796 /src
parenteb81ca4f81a27eb2fa775b8246f24f3bc3ea4f4b (diff)
downloadbinaryen-25e47f2c3e7ca8151377075432b34c95073acaca.tar.gz
binaryen-25e47f2c3e7ca8151377075432b34c95073acaca.tar.bz2
binaryen-25e47f2c3e7ca8151377075432b34c95073acaca.zip
Inlining fix: Note the start function (#3301)
Without this, we might think a function has no global uses if the only global use of it is the start.
Diffstat (limited to 'src')
-rw-r--r--src/passes/Inlining.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp
index 43addff8b..5c94755d1 100644
--- a/src/passes/Inlining.cpp
+++ b/src/passes/Inlining.cpp
@@ -343,6 +343,9 @@ struct Inlining : public Pass {
}
}
}
+ if (module->start.is()) {
+ infos[module->start].usedGlobally = true;
+ }
}
bool iteration(PassRunner* runner, Module* module) {