[PATCH] D122331: [clang][extract-api] Stop allocating APIRecords via BumpPtrAllocator

Zixu Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 13:38:03 PDT 2022


zixuw added a comment.

This is much cleaner now. Thanks Daniel!



================
Comment at: clang/include/clang/ExtractAPI/API.h:326
+  /// Note: The main use for this is being able to deduplicate strings.
   llvm::BumpPtrAllocator Allocator;
 
----------------
Should we just rename the allocator along the lines of `StringAllocator` or `StringPool` so that the code is self-explanatory?


================
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:
> 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`?


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