Add constructors.

llvm-svn: 95212
This commit is contained in:
Zhongxing Xu 2010-02-03 09:04:11 +00:00
parent 4a2f5464a7
commit dcfa2576b0
1 changed files with 5 additions and 0 deletions

View File

@ -92,6 +92,9 @@ class ImutIntervalAVLFactory : public ImutAVLFactory<ImutInfo> {
typedef typename ImutInfo::data_type_ref data_type_ref;
public:
ImutIntervalAVLFactory(BumpPtrAllocator &Alloc)
: ImutAVLFactory<ImutInfo>(Alloc) {}
TreeTy *Add(TreeTy *T, value_type_ref V) {
T = Add_internal(V,T);
MarkImmutable(T);
@ -202,6 +205,8 @@ public:
ImutIntervalAVLFactory<ImutIntervalInfo<ValT> > F;
public:
Factory(BumpPtrAllocator& Alloc) : F(Alloc) {}
ImmutableIntervalMap GetEmptyMap() {
return ImmutableIntervalMap(F.GetEmptyTree());
}