File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,17 +120,12 @@ struct ReachabilityAnalyzer : public PostWalker<ReachabilityAnalyzer> {
120120// Finds function type usage
121121
122122struct FunctionTypeAnalyzer : public PostWalker <FunctionTypeAnalyzer> {
123- std::vector<Function*> functionImports;
124123 std::vector<Function*> functions;
125124 std::vector<CallIndirect*> indirectCalls;
126125
127126 void visitFunction (Function* curr) {
128127 if (curr->type .is ()) {
129- if (curr->imported ()) {
130- functionImports.push_back (curr);
131- } else {
132- functions.push_back (curr);
133- }
128+ functions.push_back (curr);
134129 }
135130 }
136131
@@ -271,9 +266,6 @@ struct RemoveUnusedModuleElements : public Pass {
271266 }
272267 };
273268 // canonicalize all uses of function types
274- for (auto * import : analyzer.functionImports ) {
275- import ->type = canonicalize (import ->type );
276- }
277269 for (auto * func : analyzer.functions ) {
278270 func->type = canonicalize (func->type );
279271 }
You can’t perform that action at this time.
0 commit comments