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

Gabor Greif ggreif at gmail.com
Mon Mar 2 11:49:39 PST 2009


Author: ggreif
Date: Mon Mar  2 13:49:29 2009
New Revision: 65864

URL: http://llvm.org/viewvc/llvm-project?rev=65864&view=rev
Log:
drop support for GCC 2.x as it is hopelessly broken 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=65864&r1=65863&r2=65864&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/ilist.h (original)
+++ llvm/trunk/include/llvm/ADT/ilist.h Mon Mar  2 13:49:29 2009
@@ -491,14 +491,7 @@
 
   size_type size() const {
     if (Head == 0) return 0; // Don't require construction of sentinel if empty.
-#if __GNUC__ == 2
-    // GCC 2.95 has a broken std::distance
-    size_type Result = 0;
-    std::distance(begin(), end(), Result);
-    return Result;
-#else
     return std::distance(begin(), end());
-#endif
   }
 
   iterator erase(iterator first, iterator last) {
@@ -616,14 +609,10 @@
     insert(this->begin(), first, last);
   }
 
-
-  // Forwarding functions: A workaround for GCC 2.95 which does not correctly
-  // support 'using' declarations to bring a hidden member into scope.
-  //
-  iterator insert(iterator a, NodeTy *b){ return iplist<NodeTy>::insert(a, b); }
-  void push_front(NodeTy *a) { iplist<NodeTy>::push_front(a); }
-  void push_back(NodeTy *a)  { iplist<NodeTy>::push_back(a); }
-
+  // bring hidden functions into scope
+  using iplist<NodeTy>::insert;
+  using iplist<NodeTy>::push_front;
+  using iplist<NodeTy>::push_back;
 
   // Main implementation here - Insert for a node passed by value...
   iterator insert(iterator where, const NodeTy &val) {





More information about the llvm-commits mailing list