[llvm] 1ab3042 - [TableGen][DecoderEmitter] Fix indentation in generated code (NFC)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 23 21:17:44 PDT 2025


Author: Sergei Barannikov
Date: 2025-08-24T07:17:34+03:00
New Revision: 1ab3042318f8c83d356ead000a89da27ff00beca

URL: https://github.com/llvm/llvm-project/commit/1ab3042318f8c83d356ead000a89da27ff00beca
DIFF: https://github.com/llvm/llvm-project/commit/1ab3042318f8c83d356ead000a89da27ff00beca.diff

LOG: [TableGen][DecoderEmitter] Fix indentation in generated code (NFC)

`MCD::OPC_SoftFail` case in the generated `decodeInstruction()` was
overindented, except for the closing brace, which was underindented.

Added: 
    

Modified: 
    llvm/utils/TableGen/DecoderEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/DecoderEmitter.cpp b/llvm/utils/TableGen/DecoderEmitter.cpp
index 84a9d35436bef..ebd9148a505a2 100644
--- a/llvm/utils/TableGen/DecoderEmitter.cpp
+++ b/llvm/utils/TableGen/DecoderEmitter.cpp
@@ -2308,16 +2308,16 @@ static DecodeStatus decodeInstruction(const uint8_t DecodeTable[], MCInst &MI,
   }
   if (HasSoftFail) {
     OS << R"(
-      case MCD::OPC_SoftFail: {
-        // Decode the mask values.
-        uint64_t PositiveMask = decodeULEB128AndIncUnsafe(Ptr);
-        uint64_t NegativeMask = decodeULEB128AndIncUnsafe(Ptr);
-        bool Failed = (insn & PositiveMask) != 0 || (~insn & NegativeMask) != 0;
-        if (Failed)
-          S = MCDisassembler::SoftFail;
-        LLVM_DEBUG(dbgs() << Loc << ": OPC_SoftFail: " << (Failed ? "FAIL\n" : "PASS\n"));
-        break;
-  })";
+    case MCD::OPC_SoftFail: {
+      // Decode the mask values.
+      uint64_t PositiveMask = decodeULEB128AndIncUnsafe(Ptr);
+      uint64_t NegativeMask = decodeULEB128AndIncUnsafe(Ptr);
+      bool Failed = (insn & PositiveMask) != 0 || (~insn & NegativeMask) != 0;
+      if (Failed)
+        S = MCDisassembler::SoftFail;
+      LLVM_DEBUG(dbgs() << Loc << ": OPC_SoftFail: " << (Failed ? "FAIL\n" : "PASS\n"));
+      break;
+    })";
   }
   OS << R"(
     case MCD::OPC_Fail: {


        


More information about the llvm-commits mailing list