[llvm-commits] [llvm] r152746 - /llvm/trunk/include/llvm/ADT/ilist.h

Francois Pichet pichet2000 at gmail.com
Wed Mar 14 15:36:10 PDT 2012


Author: fpichet
Date: Wed Mar 14 17:36:10 2012
New Revision: 152746

URL: http://llvm.org/viewvc/llvm-project?rev=152746&view=rev
Log:
Fixes the MSVC build.
Commit r152704 exposed a latent MSVC limitation (aka bug). 
Both ilist and and iplist contains the same function:
  template<class InIt> void insert(iterator where, InIt first, InIt last) {
    for (; first != last; ++first) insert(where, *first);
  }

Also ilist inherits from iplist and ilist contains a "using iplist<NodeTy>::insert".
MSVC doesn't know which one to pick and complain with an error.

I think it is safe to delete ilist::insert since it is redundant anyway.

Modified:
    llvm/trunk/include/llvm/ADT/ilist.h

Modified: llvm/trunk/include/llvm/ADT/ilist.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist.h?rev=152746&r1=152745&r2=152746&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ilist.h (original)
+++ llvm/trunk/include/llvm/ADT/ilist.h Wed Mar 14 17:36:10 2012
@@ -652,10 +652,6 @@
   void push_front(const NodeTy &val) { insert(this->begin(), val); }
   void push_back(const NodeTy &val) { insert(this->end(), val); }
 
-  // Special forms of insert...
-  template<class InIt> void insert(iterator where, InIt first, InIt last) {
-    for (; first != last; ++first) insert(where, *first);
-  }
   void insert(iterator where, size_type count, const NodeTy &val) {
     for (; count != 0; --count) insert(where, val);
   }





More information about the llvm-commits mailing list