Fix a const violation in the generated disassembler.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 15 Aug 2012 10:26:44 +0000 (10:26 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 15 Aug 2012 10:26:44 +0000 (10:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161940 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/FixedLenDecoderEmitter.cpp

index 52a11323d85264eb88c700cfd09d7f6e96592e95..69b97cb053da1846e229d16729b048e30cd15d40 100644 (file)
@@ -905,7 +905,7 @@ emitDecoderFunction(formatted_raw_ostream &OS, DecoderSet &Decoders,
   OS.indent(Indentation) << "static DecodeStatus decodeToMCInst(DecodeStatus S,"
     << " unsigned Idx, InsnType insn, MCInst &MI,\n";
   OS.indent(Indentation) << "                                   uint64_t "
-    << "Address, void *Decoder) {\n";
+    << "Address, const void *Decoder) {\n";
   Indentation += 2;
   OS.indent(Indentation) << "InsnType tmp;\n";
   OS.indent(Indentation) << "switch (Idx) {\n";
@@ -1975,7 +1975,7 @@ static void emitDecodeInstruction(formatted_raw_ostream &OS) {
      << "      DEBUG(dbgs() << \"----- DECODE SUCCESSFUL -----\\n\");\n"
      << "\n"
      << "      MI.setOpcode(Opc);\n"
-     << "      return decodeToMCInst(S, DecodeIdx, insn, MI, Address, (void*)DisAsm);\n"
+     << "      return decodeToMCInst(S, DecodeIdx, insn, MI, Address, DisAsm);\n"
      << "    }\n"
      << "    case MCD::OPC_SoftFail: {\n"
      << "      // Decode the mask values.\n"