[llvm-commits] [llvm] r140959 - /llvm/trunk/include/llvm/ADT/ImmutableSet.h

Ted Kremenek kremenek at apple.com
Sat Oct 1 18:47:07 PDT 2011


Author: kremenek
Date: Sat Oct  1 20:47:07 2011
New Revision: 140959

URL: http://llvm.org/viewvc/llvm-project?rev=140959&view=rev
Log:
Make canonicalization of ImmutableSetRef::asImmutableSet() semi-explicit.

Modified:
    llvm/trunk/include/llvm/ADT/ImmutableSet.h

Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=140959&r1=140958&r2=140959&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Sat Oct  1 20:47:07 2011
@@ -1145,8 +1145,9 @@
     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 {





More information about the llvm-commits mailing list