[llvm] [TableGen] Fix wrong bits output in GenericTable (PR #66867)

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 02:49:13 PDT 2023


================
@@ -24,34 +24,35 @@ include "llvm/TableGen/SearchableTable.td"
 
 // CHECK-LABEL: GET_ATable_IMPL
 // CHECK: constexpr AEntry ATable[] = {
-// CHECK-NOT:   { "aaa"
-// CHECK:       { "baz"
-// CHECK:       { "foo"
-// CHECK:       { "foobar"
-// CHECK:       { "bar"
+// CHECK-NOT:   { "aaa", 0x0, 0x0, 0x0 },
----------------
fpetrogalli wrote:

Being a negative check, I'd live it as it is. Otherwise, if you introduce a bug that generates something slightly different, say `{ "aaa", 0x0, 0x0, 0x1 },`, you won't be able to prevent the regression. Essentially the `CHECK-NOT` is checking `isNeeded=0`, not the specific values passed to the `AEntry` class.

https://github.com/llvm/llvm-project/pull/66867


More information about the llvm-commits mailing list