aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ADT/ImmutableSet.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-10-02 01:47:07 +0000
committerTed Kremenek <kremenek@apple.com>2011-10-02 01:47:07 +0000
commit4f101db8852ba60d8d9545f7e0b5ad8a7b18c8b1 (patch)
tree065946660cfaba0450338ea5d49a45818f2ddab6 /include/llvm/ADT/ImmutableSet.h
parent846a2dcada30a3507a1e9af9eabc2919674e669f (diff)
Make canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/ImmutableSet.h')
-rw-r--r--include/llvm/ADT/ImmutableSet.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h
index 8e2fea5658..d597a7c9be 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<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 {