[llvm] 980bf1d - [NFC] Inline wasm assertion-only variable

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 13:07:21 PST 2020


Author: Jordan Rupprecht
Date: 2020-11-03T13:06:59-08:00
New Revision: 980bf1d5d1f0ef7021cdc75c8a190041dd9cb84a

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

LOG: [NFC] Inline wasm assertion-only variable

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
index 09d1b96d1797..c8d43010608e 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
@@ -272,8 +272,8 @@ void WebAssemblyMCInstLower::lower(const MachineInstr *MI,
             break;
           }
         } else if (Info.OperandType == WebAssembly::OPERAND_HEAPTYPE) {
-          auto HT = static_cast<WebAssembly::HeapType>(MO.getImm());
-          assert(HT != WebAssembly::HeapType::Invalid);
+          assert(static_cast<WebAssembly::HeapType>(MO.getImm()) !=
+                 WebAssembly::HeapType::Invalid);
           // With typed function references, this will need a case for type
           // index operands.  Otherwise, fall through.
         }


        


More information about the llvm-commits mailing list