Add getTreeFactory() to ImmutableSet to allow construction of ImmutableSetRef from...
[oota-llvm.git] / include / llvm / ADT / ImmutableMap.h
index 7386a3b9a1e3759e14c887a518c700c61facf3fe..8346ffabff76a8cc2bd838dda0899f0904ac302f 100644 (file)
@@ -117,6 +117,10 @@ public:
       return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T);
     }
 
+    typename TreeTy::Factory *getTreeFactory() const {
+      return const_cast<typename TreeTy::Factory *>(&F);
+    }
+
   private:
     Factory(const Factory& RHS); // DO NOT IMPLEMENT
     void operator=(const Factory& RHS); // DO NOT IMPLEMENT