[PATCH] D84293: Add an assertion in SmallVector::push_back()
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 15:30:18 PST 2020
mehdi_amini added inline comments.
================
Comment at: llvm/include/llvm/MC/MCInst.h:187
+ Operands.push_back(Op);
+ }
----------------
silvas wrote:
> mehdi_amini wrote:
> > Actually this is working around the assertion, but not fixing it.
> > The reference passed as input is invalidated by the reserve I think.
> Could we switch this to take MCOperand by value? A copy is going to be made in the push_back anyway.
Ah good point, MCOperand is cheap anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84293/new/
https://reviews.llvm.org/D84293
More information about the llvm-commits
mailing list