From: Ted Kremenek Date: Sun, 2 Oct 2011 01:47:07 +0000 (+0000) Subject: Make canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4f101db8852ba60d8d9545f7e0b5ad8a7b18c8b1;p=oota-llvm.git Make canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140959 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index 8e2fea56587..d597a7c9be7 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -1145,8 +1145,9 @@ public: return Root ? Root->contains(V) : false; } - ImmutableSet asImmutableSet() const { - return ImmutableSet(Factory->getCanonicalTree(Root)); + ImmutableSet asImmutableSet(bool canonicalize = true) const { + return ImmutableSet(canonicalize ? + Factory->getCanonicalTree(Root) : Root); } TreeTy *getRootWithoutRetain() const {