Roll an expression into an assert to fix -Wunused-variable in a -Asserts build
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 12 Nov 2015 19:07:43 +0000 (19:07 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 12 Nov 2015 19:07:43 +0000 (19:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252925 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp

index 641d6ea2b866b3b6eed346e84f6946a09ff9586e..6fc309f02615e1f604f71ca465437fb05c1dd62e 100644 (file)
@@ -172,8 +172,7 @@ void WebAssemblyAsmPrinter::EmitFunctionBodyStart() {
 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()) {