[WebAssembly] Fix a warning for an unused variable
authorHeejin Ahn <aheejin@gmail.com>
Wed, 10 Jun 2020 16:51:21 +0000 (09:51 -0700)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 10 Jun 2020 17:06:28 +0000 (10:06 -0700)
`ErasedUncondBr` is used only in an `assert`, so it triggers a warning
on builds without assertions. Fixed.

llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp

index 103fe97..ddf2d8b 100644 (file)
@@ -679,6 +679,7 @@ void WebAssemblyCFGStackify::removeUnnecessaryInstrs(MachineFunction &MF) {
     if (Analyzable && ((Cond.empty() && TBB && TBB == Cont) ||
                        (!Cond.empty() && FBB && FBB == Cont))) {
       bool ErasedUncondBr = false;
+      (void)ErasedUncondBr;
       for (auto I = EHPadLayoutPred->end(), E = EHPadLayoutPred->begin();
            I != E; --I) {
         auto PrevI = std::prev(I);