[PATCH] D51393: Provide a method for generating deterministic IDs for pointers allocated in BumpPtrAllocator
Artem Dergachev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 12:43:40 PDT 2018
NoQ added inline comments.
================
Comment at: llvm/include/llvm/Support/Allocator.h:304
+ // Use negative index to denote custom sized slabs.
+ int64_t CustomSlabOffset = 0;
+ for (size_t Idx = 0; Idx < CustomSizedSlabs.size(); Idx++) {
----------------
We should start with -1 because otherwise the first standard-slab object and the first custom-slab object would both have id 0.
https://reviews.llvm.org/D51393
More information about the llvm-commits
mailing list