summaryrefslogtreecommitdiff
path: root/src/passes/RemoveImports.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/RemoveImports.cpp')
-rw-r--r--src/passes/RemoveImports.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/passes/RemoveImports.cpp b/src/passes/RemoveImports.cpp
index e70cbb3ac..a3ca45b16 100644
--- a/src/passes/RemoveImports.cpp
+++ b/src/passes/RemoveImports.cpp
@@ -22,14 +22,14 @@
// look at all the rest of the code).
//
-#include "wasm.h"
-#include "pass.h"
#include "ir/module-utils.h"
+#include "pass.h"
+#include "wasm.h"
namespace wasm {
struct RemoveImports : public WalkerPass<PostWalker<RemoveImports>> {
- void visitCall(Call *curr) {
+ void visitCall(Call* curr) {
auto* func = getModule()->getFunction(curr->target);
if (!func->imported()) {
return;
@@ -44,19 +44,16 @@ struct RemoveImports : public WalkerPass<PostWalker<RemoveImports>> {
}
}
- void visitModule(Module *curr) {
+ void visitModule(Module* curr) {
std::vector<Name> names;
- ModuleUtils::iterImportedFunctions(*curr, [&](Function* func) {
- names.push_back(func->name);
- });
+ ModuleUtils::iterImportedFunctions(
+ *curr, [&](Function* func) { names.push_back(func->name); });
for (auto& name : names) {
curr->removeFunction(name);
}
}
};
-Pass *createRemoveImportsPass() {
- return new RemoveImports();
-}
+Pass* createRemoveImportsPass() { return new RemoveImports(); }
} // namespace wasm