[llvm-commits] [llvm] r142193 - /llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp

Owen Anderson resistor at mac.com
Mon Oct 17 09:56:47 PDT 2011


Author: resistor
Date: Mon Oct 17 11:56:47 2011
New Revision: 142193

URL: http://llvm.org/viewvc/llvm-project?rev=142193&view=rev
Log:
Fix unused variable warning in the rare circumstance that we have no feature-dependent instructions.

Modified:
    llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp

Modified: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=142193&r1=142192&r2=142193&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp Mon Oct 17 11:56:47 2011
@@ -576,8 +576,11 @@
     "static MCDisassembler::DecodeStatus decode" << Namespace << "Instruction" << BitWidth
     << "(MCInst &MI, uint" << BitWidth << "_t insn, uint64_t Address, "
     << "const void *Decoder, const MCSubtargetInfo &STI) {\n";
-  o.indent(Indentation) << "  unsigned tmp = 0;\n  (void)tmp;\n" << Emitter->Locals << "\n";
+  o.indent(Indentation) << "  unsigned tmp = 0;\n";
+  o.indent(Indentation) << "  (void)tmp;\n";
+  o.indent(Indentation) << Emitter->Locals << "\n";
   o.indent(Indentation) << "  uint64_t Bits = STI.getFeatureBits();\n";
+  o.indent(Indentation) << "  (void)Bits;\n";
 
   ++Indentation; ++Indentation;
   // Emits code to decode the instructions.





More information about the llvm-commits mailing list