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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 09:38:01 PST 2024


https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/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.


>From 172c1eec6538724e6e5e6a902d4f32d0b2c5a262 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Fri, 22 Nov 2024 17:36:20 +0000
Subject: [PATCH] [TableGen] Remove comments from generated
 validateOperandClass

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.
---
 llvm/utils/TableGen/AsmMatcherEmitter.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index ade393c11b7a24..82f28ad38b9363 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