[llvm] 28a0b94 - Rename and fix ValueMap::resize to reserve

Sven van Haastregt via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 06:01:19 PDT 2022


Author: Pedro Olsen Ferreira
Date: 2022-05-12T13:44:47+01:00
New Revision: 28a0b94d2221755aec6ab4e1c7cc3394dcef5053

URL: https://github.com/llvm/llvm-project/commit/28a0b94d2221755aec6ab4e1c7cc3394dcef5053
DIFF: https://github.com/llvm/llvm-project/commit/28a0b94d2221755aec6ab4e1c7cc3394dcef5053.diff

LOG: Rename and fix ValueMap::resize to reserve

The underlying map type (DenseMap) has had its resize() function
renamed to reserve() as part of
c04fc7a60ff4ea4610ea157be006c9771224a7b6 (SVN 264026).

This is only visible when the member function is called, as it is
template type name dependent.

Differential Revision: https://reviews.llvm.org/D125387

Added: 
    

Modified: 
    llvm/include/llvm/IR/ValueMap.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/ValueMap.h b/llvm/include/llvm/IR/ValueMap.h
index 603722a1c7c99..a4b6091cf1155 100644
--- a/llvm/include/llvm/IR/ValueMap.h
+++ b/llvm/include/llvm/IR/ValueMap.h
@@ -141,7 +141,7 @@ class ValueMap {
   size_type size() const { return Map.size(); }
 
   /// Grow the map so that it has at least Size buckets. Does not shrink
-  void resize(size_t Size) { Map.resize(Size); }
+  void reserve(size_t Size) { Map.reserve(Size); }
 
   void clear() {
     Map.clear();


        


More information about the llvm-commits mailing list