[PATCH] D84293: Add an assertion in SmallVector::push_back()
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 16:35:27 PST 2020
njames93 added inline comments.
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:10811-10813
+ Ops.reserve(Ops.size() + 1);
Ops.push_back(Ops[0]);
Ops.erase(Ops.begin());
----------------
Probably a little off topic, but shouldn't this be refactored as a rotate. Has the advantage that it will never allocate.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84293/new/
https://reviews.llvm.org/D84293
More information about the cfe-commits
mailing list