llvm-project
91eb6b88 - [AST][NFC] Use struct as string table for AttrDoc (#246953)

Commit
2 days ago
[AST][NFC] Use struct as string table for AttrDoc (#246953) Using a StringRef array has two problems: first, the length evaluation uses a strlen-like loop from std::string_view at compile time (could be fixed with StringLiteral); and second, it causes dynamic relocations. Store all strings in one single global (445 kiB) and store a second array with the offsets indexed by the attribute kind. This avoids 7.5kiB of .data.rel.ro and improves compile times of AttrDocTable.cpp.
Author
Parents
Loading