[NFC][ADT] Clean up EnumeratedArray.h
authorJannik Silvanus <jannik.silvanus@amd.com>
Tue, 18 Oct 2022 11:26:32 +0000 (13:26 +0200)
committerJannik Silvanus <jannik.silvanus@amd.com>
Tue, 18 Oct 2022 12:34:56 +0000 (14:34 +0200)
As discussed in D135594, remove superfluous inline
attributes, and remove top-level consts on function arguments.

llvm/include/llvm/ADT/EnumeratedArray.h

index f54a504..cece71d 100644 (file)
@@ -30,17 +30,17 @@ public:
       Underlying[IX] = V;
     }
   }
-  inline const ValueType &operator[](const Enumeration Index) const {
+  const ValueType &operator[](Enumeration Index) const {
     auto IX = static_cast<const IndexType>(Index);
     assert(IX >= 0 && IX < Size && "Index is out of bounds.");
     return Underlying[IX];
   }
-  inline ValueType &operator[](const Enumeration Index) {
+  ValueType &operator[](Enumeration Index) {
     return const_cast<ValueType &>(
         static_cast<const EnumeratedArray<ValueType, Enumeration, LargestEnum,
                                           IndexType, Size> &>(*this)[Index]);
   }
-  inline IndexType size() { return Size; }
+  IndexType size() { return Size; }
 
 private:
   ValueType Underlying[Size];