[PATCH] D97942: [TableGen] Fix warning when compiling generated MCCodeEmitter

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 10:35:51 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG594d0c34961d: [TableGen] Fix warning when compiling generated MCCodeEmitter (authored by foad).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97942/new/

https://reviews.llvm.org/D97942

Files:
  llvm/utils/TableGen/CodeEmitterGen.cpp


Index: llvm/utils/TableGen/CodeEmitterGen.cpp
===================================================================
--- llvm/utils/TableGen/CodeEmitterGen.cpp
+++ llvm/utils/TableGen/CodeEmitterGen.cpp
@@ -481,8 +481,8 @@
       << "    Inst = Inst.zext(" << BitWidth << ");\n"
       << "  if (Scratch.getBitWidth() != " << BitWidth << ")\n"
       << "    Scratch = Scratch.zext(" << BitWidth << ");\n"
-      << "  LoadIntFromMemory(Inst, (uint8_t *)&InstBits[opcode * " << NumWords
-      << "], " << NumBytes << ");\n"
+      << "  LoadIntFromMemory(Inst, (const uint8_t *)&InstBits[opcode * "
+      << NumWords << "], " << NumBytes << ");\n"
       << "  APInt &Value = Inst;\n"
       << "  APInt &op = Scratch;\n"
       << "  switch (opcode) {\n";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97942.328234.patch
Type: text/x-patch
Size: 756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210304/767951e2/attachment.bin>


More information about the llvm-commits mailing list