From 34fa69757f152e8a4e3b774d0118f4cd21ec5f75 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 29 Jul 2014 16:58:18 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214184 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Writer/ValueEnumerator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp index f0f9f7430c5..67634f1ac6c 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -136,11 +136,10 @@ static void predictValueUseListOrderImpl(const Value *V, const Function *F, 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, -- 2.34.1