Mark ImmutableMap::remove/add() const.
authorTed Kremenek <kremenek@apple.com>
Fri, 7 Dec 2012 19:44:12 +0000 (19:44 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 7 Dec 2012 19:44:12 +0000 (19:44 +0000)
llvm-svn: 169629

llvm/include/llvm/ADT/ImmutableMap.h

index ce27d05..f9baec2 100644 (file)
@@ -333,12 +333,12 @@ public:
     if (Root) Root->release();
   }
 
-  ImmutableMapRef add(key_type_ref K, data_type_ref D) {
+  ImmutableMapRef add(key_type_ref K, data_type_ref D) const {
     TreeTy *NewT = Factory->add(Root, std::pair<key_type, data_type>(K, D));
     return ImmutableMapRef(NewT, Factory);
   }
 
-  ImmutableMapRef remove(key_type_ref K) {
+  ImmutableMapRef remove(key_type_ref K) const {
     TreeTy *NewT = Factory->remove(Root, K);
     return ImmutableMapRef(NewT, Factory);
   }