[llvm] a5099ad - [WebAssembly] Fix a warning for an unused variable

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 10:06:45 PDT 2020


Author: Heejin Ahn
Date: 2020-06-10T10:06:28-07:00
New Revision: a5099ad918c58e8a5b713cdf5b8e946b8bdfaa5f

URL: https://github.com/llvm/llvm-project/commit/a5099ad918c58e8a5b713cdf5b8e946b8bdfaa5f
DIFF: https://github.com/llvm/llvm-project/commit/a5099ad918c58e8a5b713cdf5b8e946b8bdfaa5f.diff

LOG: [WebAssembly] Fix a warning for an unused variable

`ErasedUncondBr` is used only in an `assert`, so it triggers a warning
on builds without assertions. Fixed.

Added: 
    

Modified: 
    llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index 103fe97c6e93..ddf2d8bdfc05 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -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);


        


More information about the llvm-commits mailing list