From: David Blaikie <dblaikie@gmail.com>
Date: Tue, 24 Oct 2017 17:29:08 +0000 (+0000)
Subject: BitVector.h:capacity_in_bytes Don't mark header functions as file-scope static
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91f89f7cb41c4b0a044c37164ccb22a0e90e8025;p=llvm

BitVector.h:capacity_in_bytes Don't mark header functions as file-scope static

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
---

diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index e68ef5f53d1..99147fec4d4 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -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();
 }