[PATCH] D57914: [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.

pierre gousseau via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 18 10:23:30 PST 2019


pgousseau marked an inline comment as done.
pgousseau added inline comments.


================
Comment at: include/clang/Basic/Sanitizers.h:43
+  // Low bits of mask value.
+  uint64_t maskLo;
+  // High bits of mask value.
----------------
riccibruno wrote:
> Why not use a fixed size array of `uint64_t`s, and then compute the index without any branch with `ArrayIndex = BitPosition / 64` (with an assertion that `ArrayIndex < MaxArrayIndex` ? This has the advantage that in the future all that is needed to do is bump up the size of the array.
Sounds good! I will give it a try.


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

https://reviews.llvm.org/D57914





More information about the cfe-commits mailing list