[llvm] [NFC][TableGen] Emit more readable builtin string table. (PR #105445)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 23:32:58 PDT 2024
================
@@ -637,15 +636,17 @@ void IntrinsicEmitter::EmitIntrinsicToBuiltinMap(
// Populate the string table with the names of all the builtins after
// removing this common prefix.
- StringToOffsetTable Table;
+ SequenceToOffsetTable<StringRef> Table;
----------------
s-barannikov wrote:
I agree with @arsenm
If the main purpose of this PR is to make the emitted string table more readable, I think it can be achieved in other ways. For example, by changing EmitCharArray to something like:
```
void EmitNullSeparatedString(raw_ostream &O) {
for (StringRef Str : split(AggregateString, '\0'))
O << " \"" << Str << "\\0\"\n";
}
```
https://github.com/llvm/llvm-project/pull/105445
More information about the llvm-commits
mailing list