From 91171c5406aa7a808cfb281b48793f84db14077e Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 10 Jul 2008 22:57:10 +0000 Subject: [PATCH] Added ImmutableMap constructor that accepts a const TreeTy*. llvm-svn: 53429 --- include/llvm/ADT/ImmutableMap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/llvm/ADT/ImmutableMap.h b/include/llvm/ADT/ImmutableMap.h index ae2a335942d..bbf34c566d8 100644 --- a/include/llvm/ADT/ImmutableMap.h +++ b/include/llvm/ADT/ImmutableMap.h @@ -76,7 +76,8 @@ public: /// 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(R)) {} class Factory { typename TreeTy::Factory F;