Skip to content
Commit 566eb864 authored by Justin Lebar's avatar Justin Lebar
Browse files

[ADT] static_assert that SmallDenseMap is instantiated with a power-of-two...

[ADT] static_assert that SmallDenseMap is instantiated with a power-of-two number of inline buckets.

Summary:
If you try to instantiate it with a non-power-of-two buckets, DenseMap
will assert at runtime (!) if we ever outgrow our inline storage.

I believe using a constexpr function inside of a static_assert is safe
now that we've unsupported MSVC 2013 and GCC < 4.8.

Reviewers: bkramer, qcolombet, escha

Subscribers: llvm-commits

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

llvm-svn: 284985
parent 68154687
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment