[llvm] [TableGen] Use a more efficient memory buffer for output (PR #123353)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 00:13:50 PST 2025
kazutakahirata wrote:
@jayfoad Would it be acceptable to call `std::string::reserve` with the size of the existing output file? It might seem less elegant to rely on the file to be overwritten, but we read the existing output file for comparison purposes anyway, so we might as well use its size.
https://github.com/llvm/llvm-project/blob/69d0c4c1675c90cf99126210679a9c3ae0a8637e/llvm/lib/TableGen/Main.cpp#L155-L163
https://github.com/llvm/llvm-project/pull/123353
More information about the llvm-commits
mailing list