summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit539801f8bc0958333998a8d8096f10b55617af5f (patch)
tree0b9ed58eebb3b1373850184f5bbcf8a9e7eff39c /llvm
parentc8f008ac313c9e4da0a985d1fd7854f7a218ed12 (diff)
downloadbcm5719-llvm-539801f8bc0958333998a8d8096f10b55617af5f.tar.gz
bcm5719-llvm-539801f8bc0958333998a8d8096f10b55617af5f.zip
Make canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit.
llvm-svn: 140959
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/ImmutableSet.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h
index 8e2fea56587..d597a7c9be7 100644
--- a/llvm/include/llvm/ADT/ImmutableSet.h
+++ b/llvm/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 {
OpenPOWER on IntegriCloud