From 987003944456c3d04f74c12067ac950feca1a81e Mon Sep 17 00:00:00 2001 From: "Alon Zakai (kripken)" Date: Mon, 10 Jul 2017 11:22:19 -0700 Subject: add the option to seek named breaks, not just taken breaks; refactor headers to make this practical --- src/passes/DeadCodeElimination.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/passes/DeadCodeElimination.cpp') diff --git a/src/passes/DeadCodeElimination.cpp b/src/passes/DeadCodeElimination.cpp index 209180e23..321bc0f9a 100644 --- a/src/passes/DeadCodeElimination.cpp +++ b/src/passes/DeadCodeElimination.cpp @@ -30,9 +30,9 @@ #include #include -#include #include #include +#include #include namespace wasm { @@ -184,7 +184,7 @@ struct DeadCodeElimination : public WalkerPass> if (curr->name.is()) { reachableBreaks.erase(curr->name); } - if (isUnreachable(curr->body) && !BreakSeeker::has(curr->body, curr->name)) { + if (isUnreachable(curr->body) && !BranchUtils::BranchSeeker::hasNamed(curr->body, curr->name)) { replaceCurrent(curr->body); return; } -- cgit v1.2.3