[all-commits] [llvm/llvm-project] bc6f84: [StrTable] Switch diag group names to `llvm::Strin...
Chandler Carruth via All-commits
all-commits at lists.llvm.org
Wed Jan 22 00:41:49 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bc6f84a2db6e7d60d70cf9be8d6cce2a101d0faa
https://github.com/llvm/llvm-project/commit/bc6f84a2db6e7d60d70cf9be8d6cce2a101d0faa
Author: Chandler Carruth <chandlerc at gmail.com>
Date: 2025-01-22 (Wed, 22 Jan 2025)
Changed paths:
M clang/lib/Basic/DiagnosticIDs.cpp
M clang/tools/diagtool/DiagnosticNames.cpp
M clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
M llvm/include/llvm/ADT/StringTable.h
Log Message:
-----------
[StrTable] Switch diag group names to `llvm::StringTable` (#123302)
Previously, they used a hand-rolled Pascal-string encoding different
from all the other string tables produced from TableGen. This moves them
to use the newly introduced runtime abstraction, and enhances that
abstraction to support iterating over the string table as used in this
case.
>From what I can tell the Pascal-string encoding isn't critical here to
avoid expensive `strlen` calls, so I think this is a simpler and more
consistent model. But if folks would prefer a Pascal-string style
encoding, I can instead work to switch the `StringTable` abstraction
towards that. It would require some tricky tradeoffs though to make it
reasonably general: either using 4 bytes instead of 1 byte to encode the
size, or having a fallback to `strlen` for long strings.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list