SymbolRewriter: use iplist::splice
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 5 Jan 2015 17:56:32 +0000 (17:56 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 5 Jan 2015 17:56:32 +0000 (17:56 +0000)
The swap implementation for iplist is currently unsupported.  Simply splice the
old list into place, which achieves the same purpose.  This is needed in order
to thread the -frewrite-map-file frontend option correctly.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225186 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SymbolRewriter.cpp

index 9f57ad1c64f504394d4990127a55e7085a4bdec6..b35a662f17b5005ab3a3228c52e897f9fe0166d0 100644 (file)
@@ -494,7 +494,7 @@ RewriteSymbols::RewriteSymbols() : ModulePass(ID) {
 
 RewriteSymbols::RewriteSymbols(SymbolRewriter::RewriteDescriptorList &DL)
     : ModulePass(ID) {
-  std::swap(Descriptors, DL);
+  Descriptors.splice(Descriptors.begin(), DL);
 }
 
 bool RewriteSymbols::runOnModule(Module &M) {