IR: Create the use-list order shuffle vector in-place
Per David Blaikie's review of r214135, this is a more natural way to
initialize.
llvm-svn: 214184
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
index f0f9f74..67634f1 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -136,11 +136,10 @@
return;
// Store the shuffle.
- UseListOrder O(V, F, List.size());
- assert(List.size() == O.Shuffle.size() && "Wrong size");
+ Stack.emplace_back(V, F, List.size());
+ assert(List.size() == Stack.back().Shuffle.size() && "Wrong size");
for (size_t I = 0, E = List.size(); I != E; ++I)
- O.Shuffle[I] = List[I].second;
- Stack.emplace_back(std::move(O));
+ Stack.back().Shuffle[I] = List[I].second;
}
static void predictValueUseListOrder(const Value *V, const Function *F,