From 62e9f5d881e2d7e7f9f5da845ed2dbc176bc0bc5 Mon Sep 17 00:00:00 2001 From: jgravelle-google Date: Fri, 10 Mar 2017 13:10:17 -0800 Subject: Wasm h to cpp (#926) * Move WasmType function implementations to wasm.cpp * Move Literal methods to wasm.cpp * Reorder wasm.cpp shared constants back to top * Move expression functions to wasm.cpp * Finish moving things to wasm.cpp * Split out Literal into its own .h/.cpp. Also factor out common wasm-type module * Remove unneeded/transitive includes from wasm.h * Add comment to try/check methods * Rename tryX/checkX methods to getXOrNull * Add missing include that should fix appveyor build breakage * More appveyor --- src/passes/RemoveUnusedModuleElements.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/passes/RemoveUnusedModuleElements.cpp') diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp index 52a3ffc08..392096b72 100644 --- a/src/passes/RemoveUnusedModuleElements.cpp +++ b/src/passes/RemoveUnusedModuleElements.cpp @@ -59,13 +59,13 @@ struct ReachabilityAnalyzer : public PostWalker { reachable.insert(curr); if (curr.first == ModuleElementKind::Function) { // if not an import, walk it - auto* func = module->checkFunction(curr.second); + auto* func = module->getFunctionOrNull(curr.second); if (func) { walk(func->body); } } else { // if not imported, it has an init expression we need to walk - auto* glob = module->checkGlobal(curr.second); + auto* glob = module->getGlobalOrNull(curr.second); if (glob) { walk(glob->init); } -- cgit v1.2.3