Make canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2011-10-02 01:47:07 +00:00
parent 846a2dcada
commit 4f101db885

View File

@ -1145,8 +1145,9 @@ public:
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 {