[PATCH] D94439: [ADT][NFC] Use empty base optimisation in BumpPtrAllocatorImpl

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 12:53:23 PST 2021


dblaikie added a comment.

In D94439#2491180 <https://reviews.llvm.org/D94439#2491180>, @njames93 wrote:

> In D94439#2491075 <https://reviews.llvm.org/D94439#2491075>, @dblaikie wrote:
>
>> I think for full generality the standard library does some things to check if a type can be derived from before using it in this way - but we probably don't need all that machinery for LLVM-internal allocator stuff like this?
>
> We just have to make sure people don't use an allocator that's defined with the final keyword. I doubt we are going to run into many cases of that. 
> I have done the template magic to get it make it work if someone wants to use an allocator marked final, should I include it?

Probably wouldn't bother - might be worth leaving it here or in the commit message, or in a comment in the code as a "here's how to do it if it turns out someone needs it".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94439/new/

https://reviews.llvm.org/D94439



More information about the llvm-commits mailing list