]> granicus.if.org Git - llvm/commitdiff
BitVector.h:capacity_in_bytes Don't mark header functions as file-scope static
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 24 Oct 2017 17:29:08 +0000 (17:29 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 24 Oct 2017 17:29:08 +0000 (17:29 +0000)
This creates ODR violations if the function is called from another
inline function in a header and also creates binary bloat from duplicate
definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316470 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/BitVector.h

index e68ef5f53d106544d48f031909caee7dcbb3f1fd..99147fec4d4c773e0dd39a23fe01203e0d108a0c 100644 (file)
@@ -911,7 +911,7 @@ public:
   size_t getBitCapacity() const { return Bits.size() * BITWORD_SIZE; }
 };
 
-static inline size_t capacity_in_bytes(const BitVector &X) {
+inline size_t capacity_in_bytes(const BitVector &X) {
   return X.getMemorySize();
 }