Add getTreeFactory() to ImmutableSet to allow construction of ImmutableSetRef from...
authorAnna Zaks <ganna@apple.com>
Fri, 23 Sep 2011 19:10:26 +0000 (19:10 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 23 Sep 2011 19:10:26 +0000 (19:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140402 91177308-0d34-0410-b5e6-96231b3b80d8

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