diff options
author | Sam Clegg <sbc@chromium.org> | 2022-12-01 17:27:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 01:27:59 +0000 |
commit | 197b6da7afe6ec317011800abf9453402e6beaa5 (patch) | |
tree | 564ae447dc2af116be8948703da85e8d9198f7c4 /src/passes/Poppify.cpp | |
parent | f70bc4d6634c5a0b1aa88f3c073b783e83bb5712 (diff) | |
download | binaryen-197b6da7afe6ec317011800abf9453402e6beaa5.tar.gz binaryen-197b6da7afe6ec317011800abf9453402e6beaa5.tar.bz2 binaryen-197b6da7afe6ec317011800abf9453402e6beaa5.zip |
Use C++17's [[maybe_unused]]. NFC (#5309)
Diffstat (limited to 'src/passes/Poppify.cpp')
-rw-r--r-- | src/passes/Poppify.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/passes/Poppify.cpp b/src/passes/Poppify.cpp index e47b13568..a7f3e5ccc 100644 --- a/src/passes/Poppify.cpp +++ b/src/passes/Poppify.cpp @@ -243,16 +243,14 @@ void Poppifier::emit(Expression* curr) { }; void Poppifier::emitIfElse(If* curr) { - auto& scope = scopeStack.back(); - WASM_UNUSED(scope); + [[maybe_unused]] auto& scope = scopeStack.back(); assert(scope.kind == Scope::If); patchScope(curr->ifTrue); scopeStack.emplace_back(Scope::Else); } void Poppifier::emitCatch(Try* curr, Index i) { - auto& scope = scopeStack.back(); - WASM_UNUSED(scope); + [[maybe_unused]] auto& scope = scopeStack.back(); if (i == 0) { assert(scope.kind == Scope::Try); patchScope(curr->body); @@ -264,8 +262,7 @@ void Poppifier::emitCatch(Try* curr, Index i) { } void Poppifier::emitCatchAll(Try* curr) { - auto& scope = scopeStack.back(); - WASM_UNUSED(scope); + [[maybe_unused]] auto& scope = scopeStack.back(); if (curr->catchBodies.size() == 1) { assert(scope.kind == Scope::Try); patchScope(curr->body); @@ -277,8 +274,7 @@ void Poppifier::emitCatchAll(Try* curr) { } void Poppifier::emitDelegate(Try* curr) { - auto& scope = scopeStack.back(); - WASM_UNUSED(scope); + [[maybe_unused]] auto& scope = scopeStack.back(); assert(scope.kind == Scope::Try); patchScope(curr->body); scopeStack.back().instrs.push_back(curr); @@ -310,8 +306,7 @@ void Poppifier::emitScopeEnd(Expression* curr) { } void Poppifier::emitFunctionEnd() { - auto& scope = scopeStack.back(); - WASM_UNUSED(scope); + [[maybe_unused]] auto& scope = scopeStack.back(); assert(scope.kind == Scope::Func); patchScope(func->body); } |