[llvm] r252925 - Roll an expression into an assert to fix -Wunused-variable in a -Asserts build

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 11:07:43 PST 2015


Author: dblaikie
Date: Thu Nov 12 13:07:43 2015
New Revision: 252925

URL: http://llvm.org/viewvc/llvm-project?rev=252925&view=rev
Log:
Roll an expression into an assert to fix -Wunused-variable in a -Asserts build

Modified:
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp?rev=252925&r1=252924&r2=252925&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Thu Nov 12 13:07:43 2015
@@ -172,8 +172,7 @@ void WebAssemblyAsmPrinter::EmitFunction
 void WebAssemblyAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   DEBUG(dbgs() << "EmitInstruction: " << *MI << '\n');
 
-  unsigned NumDefs = MI->getDesc().getNumDefs();
-  assert(NumDefs <= 1 &&
+  assert(MI->getDesc().getNumDefs() <= 1 &&
          "Instructions with multiple result values not implemented");
 
   switch (MI->getOpcode()) {




More information about the llvm-commits mailing list