[clang] [Clang][TableGen] Change NeonEmitter to use const Record * (PR #110597)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 1 09:17:21 PDT 2024


================
@@ -1161,11 +1161,9 @@ void SVEEmitter::createIntrinsic(
   uint64_t Merge = R->getValueAsInt("Merge");
   StringRef MergeSuffix = R->getValueAsString("MergeSuffix");
   uint64_t MemEltType = R->getValueAsInt("MemEltType");
-  std::vector<Record*> FlagsList = R->getValueAsListOfDefs("Flags");
-  std::vector<Record*> ImmCheckList = R->getValueAsListOfDefs("ImmChecks");
 
   int64_t Flags = 0;
-  for (auto FlagRec : FlagsList)
+  for (auto FlagRec : R->getValueAsListOfConstDefs("Flags"))
----------------
kazutakahirata wrote:

In `NeonEmitter.cpp`, you are replacing `const auto *` with `const Record *`.  You might want to be consistent here with:

```suggestion
  for (const Record *FlagRec : R->getValueAsListOfConstDefs("Flags"))
```

The LLVM coding conventions are not very prescriptive regarding `auto`, so I tend to use the actual type name if it's short.

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


More information about the cfe-commits mailing list