[llvm] r358335 - [CallingConvLower] Use SmallVectorImpl::swap

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 13 08:58:48 PDT 2019


Author: maskray
Date: Sat Apr 13 08:58:48 2019
New Revision: 358335

URL: http://llvm.org/viewvc/llvm-project?rev=358335&view=rev
Log:
[CallingConvLower] Use SmallVectorImpl::swap

Modified:
    llvm/trunk/include/llvm/CodeGen/CallingConvLower.h

Modified: llvm/trunk/include/llvm/CodeGen/CallingConvLower.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/CallingConvLower.h?rev=358335&r1=358334&r2=358335&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/CallingConvLower.h (original)
+++ llvm/trunk/include/llvm/CodeGen/CallingConvLower.h Sat Apr 13 08:58:48 2019
@@ -556,7 +556,7 @@ public:
 
     // Sort the locations of the arguments according to their original position.
     SmallVector<CCValAssign, 16> TmpArgLocs;
-    std::swap(TmpArgLocs, Locs);
+    TmpArgLocs.swap(Locs);
     auto B = TmpArgLocs.begin(), E = TmpArgLocs.end();
     std::merge(B, B + NumFirstPassLocs, B + NumFirstPassLocs, E,
                std::back_inserter(Locs),




More information about the llvm-commits mailing list