[PATCH] D53260: [ADT] Fix a bug in DenseSet's initializer_list constructor.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 14 12:24:00 PDT 2018
craig.topper added inline comments.
================
Comment at: include/llvm/ADT/DenseSet.h:71
DenseSetImpl(std::initializer_list<ValueT> Elems)
- : DenseSetImpl(Elems.size()) {
+ : DenseSetImpl(NextPowerOf2(Elems.size())) {
insert(Elems.begin(), Elems.end());
----------------
Shouldn’t this be PowerOf2Ceil? NextPowerOf2 will change a number that is already a power of 2.
Repository:
rL LLVM
https://reviews.llvm.org/D53260
More information about the llvm-commits
mailing list