[PATCH] D50330: [RFC] Implement out-of-process allocator enumeration for macOS

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 05:47:12 PDT 2018


delcypher added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_allocator_bytemap.h:21
  public:
+  typedef FlatByteMap<kSize> ThisT;
   void Init() {
----------------
vitalybuka wrote:
> I'd avoid this typedefs use in implementation only
> for sizeof please use actual variables, e.g. sizeof(*this)
> other few places just decltype(*this)
I can't do as you suggest because `ReadOutOfProcess` is a `static` method so there is no `this` pointer. However we can make this `typedef` private if you prefer. I was copying an existing pattern I saw in the size class allocators.


https://reviews.llvm.org/D50330





More information about the llvm-commits mailing list