aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-07-10 22:57:10 +0000
committerTed Kremenek <kremenek@apple.com>2008-07-10 22:57:10 +0000
commitc69812ea8eb7111ebccd78b205ad400b83e7c676 (patch)
treeecba7f8f9a591c39342bc687fd16c16148bc4db8
parent157ff939b46c8cef0963a93f97a1562a225818de (diff)
downloadexternal_llvm-c69812ea8eb7111ebccd78b205ad400b83e7c676.zip
external_llvm-c69812ea8eb7111ebccd78b205ad400b83e7c676.tar.gz
external_llvm-c69812ea8eb7111ebccd78b205ad400b83e7c676.tar.bz2
Added ImmutableMap constructor that accepts a const TreeTy*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53429 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/ImmutableMap.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/ADT/ImmutableMap.h b/include/llvm/ADT/ImmutableMap.h
index ae2a335..bbf34c5 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<TreeTy*>(R)) {}
class Factory {
typename TreeTy::Factory F;