[llvm] 5352478 - [TableGen] Remove comments from generated validateOperandClass (#117352)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 04:11:05 PST 2024


Author: Jay Foad
Date: 2024-11-25T12:11:01Z
New Revision: 535247841d8635bc998ec0ec4871ea22f27caba6

URL: https://github.com/llvm/llvm-project/commit/535247841d8635bc998ec0ec4871ea22f27caba6
DIFF: https://github.com/llvm/llvm-project/commit/535247841d8635bc998ec0ec4871ea22f27caba6.diff

LOG: [TableGen] Remove comments from generated validateOperandClass (#117352)

This generated comments like:

  // 'BoolReg' class
  case MCK_BoolReg: {

which seem redundant because the name is always repeated on the next
line as part of the MCK_ enumerator.

Added: 
    

Modified: 
    llvm/utils/TableGen/AsmMatcherEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 3e0be7027eeff9..c2aa571b547c64 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -2491,7 +2491,6 @@ static void emitValidateOperandClass(AsmMatcherInfo &Info, raw_ostream &OS) {
     if (!CI.isUserClass())
       continue;
 
-    OS << "  // '" << CI.ClassName << "' class\n";
     OS << "  case " << CI.Name << ": {\n";
     OS << "    DiagnosticPredicate DP(Operand." << CI.PredicateMethod
        << "());\n";


        


More information about the llvm-commits mailing list