[sanitizer] NFC: add static_assert to confirm that we use reasonable ByteMap type
authorVitaly Buka <vitalybuka@google.com>
Sat, 27 Apr 2019 02:13:26 +0000 (02:13 +0000)
committerVitaly Buka <vitalybuka@google.com>
Sat, 27 Apr 2019 02:13:26 +0000 (02:13 +0000)
commit83c6d10b62a9575c19dfb0977ef675aeb996319a
tree4ab5551f14222d9bd885e894790ebddf4ec3d539
parent76c5b62988ffa2cd64facc48074e5cb355c8a5f4
[sanitizer] NFC: add static_assert to confirm that we use reasonable ByteMap type

Summary: If bots work we can replace #ifs with template specialization by TwoLevelByteMapSize1.

There is known users of TwoLevelByteMap with TwoLevelByteMapSize1 equal 8,
and users of FlatByteMap with TwoLevelByteMapSize1 equal 2.

Reviewers: eugenis

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D61200

llvm-svn: 359364
compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary32.h