Skip to content

Commit

Permalink
Add getTreeFactory() to ImmutableSet to allow construction of Immutab…
Browse files Browse the repository at this point in the history
…leSetRef from an ImmutableSet object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140402 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
AnnaZaks committed Sep 23, 2011
1 parent 45b73e2 commit b3e3b00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/llvm/ADT/ImmutableMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ class ImmutableMap {
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
Expand Down

0 comments on commit b3e3b00

Please sign in to comment.