From: Gabor Greif Date: Mon, 2 Mar 2009 19:49:29 +0000 (+0000) Subject: drop support for GCC 2.x as it is hopelessly broken anyway X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=83b5752747ea14696b0e51904722c38771f22eb7;p=oota-llvm.git drop support for GCC 2.x as it is hopelessly broken anyway git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65864 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/ilist.h b/include/llvm/ADT/ilist.h index 962a29d0ff2..ee7d199230c 100644 --- a/include/llvm/ADT/ilist.h +++ b/include/llvm/ADT/ilist.h @@ -491,14 +491,7 @@ public: 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 @@ struct ilist : public iplist { 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::insert(a, b); } - void push_front(NodeTy *a) { iplist::push_front(a); } - void push_back(NodeTy *a) { iplist::push_back(a); } - + // bring hidden functions into scope + using iplist::insert; + using iplist::push_front; + using iplist::push_back; // Main implementation here - Insert for a node passed by value... iterator insert(iterator where, const NodeTy &val) {