diff options
author | Nathan James <n.james93@hotmail.co.uk> | 2020-11-03 14:57:08 +0000 |
---|---|---|
committer | Nathan James <n.james93@hotmail.co.uk> | 2020-11-03 14:57:10 +0000 |
commit | 97e8da45f9459ce9334c2d387ada7d2cde9625f4 (patch) | |
tree | e6ae888c2659f152f61b5dc50a52495e3ee9c65e /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp | |
parent | e8d67ef2dc93af671a2123caaf302709ba6e15d5 (diff) | |
download | llvm-97e8da45f9459ce9334c2d387ada7d2cde9625f4.zip llvm-97e8da45f9459ce9334c2d387ada7d2cde9625f4.tar.gz llvm-97e8da45f9459ce9334c2d387ada7d2cde9625f4.tar.bz2 |
[ADT] Add SmallVector::pop_back_n
Adds a method called pop_back_n to SmallVector.
This is more readable and less error prone than the alternatives of using
```lang=c++
Vector.resize(Vector.size() - N);
Vector.erase(Vector.end() - N, Vector.end());
for (unsigned I = 0;I<N;++I) Vector.pop_back();
```
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D90576
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
0 files changed, 0 insertions, 0 deletions