[llvm] r225186 - SymbolRewriter: use iplist::splice

Saleem Abdulrasool compnerd at compnerd.org
Mon Jan 5 09:56:32 PST 2015


Author: compnerd
Date: Mon Jan  5 11:56:32 2015
New Revision: 225186

URL: http://llvm.org/viewvc/llvm-project?rev=225186&view=rev
Log:
SymbolRewriter: use iplist::splice

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.

Modified:
    llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp?rev=225186&r1=225185&r2=225186&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp Mon Jan  5 11:56:32 2015
@@ -494,7 +494,7 @@ RewriteSymbols::RewriteSymbols() : Modul
 
 RewriteSymbols::RewriteSymbols(SymbolRewriter::RewriteDescriptorList &DL)
     : ModulePass(ID) {
-  std::swap(Descriptors, DL);
+  Descriptors.splice(Descriptors.begin(), DL);
 }
 
 bool RewriteSymbols::runOnModule(Module &M) {





More information about the llvm-commits mailing list