1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
15 #include "allocators.h"
19 static bool allocator_constructed;
21 typedef A1<int> allocator_type;
25 alloc_last() : data_(0) {}
26 alloc_last(int d) : data_(d) {}
27 alloc_last(const A1<int>& a)
31 allocator_constructed = true;
34 alloc_last(int d, const A1<int>& a)
38 allocator_constructed = true;
41 alloc_last(const alloc_last& d, const A1<int>& a)
45 allocator_constructed = true;
48 ~alloc_last() {data_ = -1;}
50 friend bool operator==(const alloc_last& x, const alloc_last& y)
51 {return x.data_ == y.data_;}
52 friend bool operator< (const alloc_last& x, const alloc_last& y)
53 {return x.data_ < y.data_;}
56 bool alloc_last::allocator_constructed = false;
58 #endif // ALLOC_LAST_H