[llvm-commits] [llvm] r53429 - /llvm/trunk/include/llvm/ADT/ImmutableMap.h

Ted Kremenek kremenek at apple.com
Thu Jul 10 15:57:11 PDT 2008


Author: kremenek
Date: Thu Jul 10 17:57:10 2008
New Revision: 53429

URL: http://llvm.org/viewvc/llvm-project?rev=53429&view=rev
Log:
Added ImmutableMap constructor that accepts a const TreeTy*.

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

Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=53429&r1=53428&r2=53429&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Thu Jul 10 17:57:10 2008
@@ -76,7 +76,8 @@
   /// should use a Factory object to create maps instead of directly
   /// invoking the constructor, but there are cases where make this
   /// constructor public is useful.
-  explicit ImmutableMap(TreeTy* R) : Root(R) {}
+  explicit ImmutableMap(TreeTy* R) : Root(R) {}  
+  explicit ImmutableMap(const TreeTy* R) : Root(const_cast<TreeTy*>(R)) {}
   
   class Factory {
     typename TreeTy::Factory F;





More information about the llvm-commits mailing list