[PATCH] D122331: [clang][extract-api] Stop allocating APIRecords via BumpPtrAllocator
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 24 05:04:08 PDT 2022
dang added inline comments.
================
Comment at: clang/include/clang/ExtractAPI/API.h:326
+ /// Note: The main use for this is being able to deduplicate strings.
llvm::BumpPtrAllocator Allocator;
----------------
zixuw wrote:
> zixuw wrote:
> > Should we just rename the allocator along the lines of `StringAllocator` or `StringPool` so that the code is self-explanatory?
> Also now that the allocator is used exclusively for strings, should we use `SpecificBumpPtrAllocator`?
After thinking about it, we shouldn't because we are storing strings that shouldn't be modified as `const char *` so we shouldn't need to call destructors.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122331/new/
https://reviews.llvm.org/D122331
More information about the cfe-commits
mailing list