@@ -43,40 +43,40 @@ class IndexedMap {
4343 // is trivially copyable.
4444 using StorageT = SmallVector<T, 0 >;
4545
46- StorageT storage_ ;
47- T nullVal_ = T();
48- ToIndexT toIndex_ ;
46+ StorageT Storage ;
47+ T NullVal = T();
48+ ToIndexT ToIndex ;
4949
5050public:
5151 IndexedMap () = default ;
5252
53- explicit IndexedMap (const T &val ) : nullVal_(val ) {}
53+ explicit IndexedMap (const T &Val ) : NullVal(Val ) {}
5454
55- typename StorageT::reference operator [](IndexT n ) {
56- assert (toIndex_ (n ) < storage_ .size () && " index out of bounds!" );
57- return storage_[ toIndex_ (n )];
55+ typename StorageT::reference operator [](IndexT N ) {
56+ assert (ToIndex (N ) < Storage .size () && " index out of bounds!" );
57+ return Storage[ ToIndex (N )];
5858 }
5959
60- typename StorageT::const_reference operator [](IndexT n ) const {
61- assert (toIndex_ (n ) < storage_ .size () && " index out of bounds!" );
62- return storage_[ toIndex_ (n )];
60+ typename StorageT::const_reference operator [](IndexT N ) const {
61+ assert (ToIndex (N ) < Storage .size () && " index out of bounds!" );
62+ return Storage[ ToIndex (N )];
6363 }
6464
65- void reserve (typename StorageT::size_type s ) { storage_ .reserve (s ); }
65+ void reserve (typename StorageT::size_type S ) { Storage .reserve (S ); }
6666
67- void resize (typename StorageT::size_type s ) { storage_ .resize (s, nullVal_ ); }
67+ void resize (typename StorageT::size_type S ) { Storage .resize (S, NullVal ); }
6868
69- void clear () { storage_ .clear (); }
69+ void clear () { Storage .clear (); }
7070
71- void grow (IndexT n ) {
72- unsigned NewSize = toIndex_ (n ) + 1 ;
73- if (NewSize > storage_ .size ())
71+ void grow (IndexT N ) {
72+ unsigned NewSize = ToIndex (N ) + 1 ;
73+ if (NewSize > Storage .size ())
7474 resize (NewSize);
7575 }
7676
77- bool inBounds (IndexT n ) const { return toIndex_ (n ) < storage_ .size (); }
77+ bool inBounds (IndexT N ) const { return ToIndex (N ) < Storage .size (); }
7878
79- typename StorageT::size_type size () const { return storage_ .size (); }
79+ typename StorageT::size_type size () const { return Storage .size (); }
8080};
8181
8282} // namespace llvm
0 commit comments