[llvm] [TableGen] Use StringTable for searchable tables (PR #206252)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 27 07:12:50 PDT 2026
================
@@ -396,11 +399,20 @@ void SearchableTableEmitter::emitLookupFunction(const GenericTable &Table,
OS << " { ";
ListSeparator LS;
for (const auto &Field : Index.Fields) {
- std::string Repr = primaryRepresentation(
- Index.Loc, Field, EntryRec->getValueInit(Field.Name));
+ const Init *Value = EntryRec->getValueInit(Field.Name);
+ std::string Repr = primaryRepresentation(Index.Loc, Field, Value);
if (isa<StringRecTy>(Field.RecType))
Repr = StringRef(Repr).upper();
- OS << LS << Repr;
+ if (isa<StringRecTy>(Field.RecType)) {
----------------
nikic wrote:
Combine the two conditions?
https://github.com/llvm/llvm-project/pull/206252
More information about the llvm-commits
mailing list