Skip to content

Commit

Permalink
Make canonicalization of ImmutableSetRef::asImmutableSet() semi-expli…
Browse files Browse the repository at this point in the history
…cit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140959 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
tkremenek committed Oct 2, 2011
1 parent 846a2dc commit 4f101db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/llvm/ADT/ImmutableSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1145,8 +1145,9 @@ class ImmutableSetRef {
return Root ? Root->contains(V) : false;
}

ImmutableSet<ValT> asImmutableSet() const {
return ImmutableSet<ValT>(Factory->getCanonicalTree(Root));
ImmutableSet<ValT> asImmutableSet(bool canonicalize = true) const {
return ImmutableSet<ValT>(canonicalize ?
Factory->getCanonicalTree(Root) : Root);
}

TreeTy *getRootWithoutRetain() const {
Expand Down

0 comments on commit 4f101db

Please sign in to comment.