summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2009-03-02 19:49:29 +0000
committerGabor Greif <ggreif@gmail.com>2009-03-02 19:49:29 +0000
commit659b0f3063133cc3a410a696a7be54b72af2a80c (patch)
tree8eba15556d11d300c07afd0a37c6367e36f4c372 /llvm
parent5e26e3628325463c490ab3defdb5fbf5c4bd3396 (diff)
downloadbcm5719-llvm-659b0f3063133cc3a410a696a7be54b72af2a80c.tar.gz
bcm5719-llvm-659b0f3063133cc3a410a696a7be54b72af2a80c.zip
drop support for GCC 2.x as it is hopelessly broken anyway
llvm-svn: 65864
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/ilist.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/llvm/include/llvm/ADT/ilist.h b/llvm/include/llvm/ADT/ilist.h
index 962a29d0ff2..ee7d199230c 100644
--- a/llvm/include/llvm/ADT/ilist.h
+++ b/llvm/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<NodeTy> {
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) {
OpenPOWER on IntegriCloud