aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-01-28 22:21:14 -0800
committerKazu Hirata <kazu@google.com>2021-01-28 22:21:14 -0800
commit7925aa091db0f16b967fc82243601e207a29ebeb (patch)
tree0388c11189b154daafaa39d1cce9d9c5779242c7 /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
parent046cfb856517c6140d5e1c0989232e26d00b05b2 (diff)
downloadllvm-7925aa091db0f16b967fc82243601e207a29ebeb.zip
llvm-7925aa091db0f16b967fc82243601e207a29ebeb.tar.gz
llvm-7925aa091db0f16b967fc82243601e207a29ebeb.tar.bz2
[llvm] Populate SmallVector at construction time (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 18ffe8b..70f8650 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -2641,9 +2641,7 @@ std::tuple<bool, bool> InstrRefBasedLDV::vlocJoin(
auto &ILS = *ILSIt->second;
// Order predecessors by RPOT order, for exploring them in that order.
- SmallVector<MachineBasicBlock *, 8> BlockOrders;
- for (auto p : MBB.predecessors())
- BlockOrders.push_back(p);
+ SmallVector<MachineBasicBlock *, 8> BlockOrders(MBB.predecessors());
auto Cmp = [&](MachineBasicBlock *A, MachineBasicBlock *B) {
return BBToOrder[A] < BBToOrder[B];