[llvm] r316470 - BitVector.h:capacity_in_bytes Don't mark header functions as file-scope static
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 10:29:09 PDT 2017
Author: dblaikie
Date: Tue Oct 24 10:29:08 2017
New Revision: 316470
URL: http://llvm.org/viewvc/llvm-project?rev=316470&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/ADT/BitVector.h
Modified: llvm/trunk/include/llvm/ADT/BitVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/BitVector.h?rev=316470&r1=316469&r2=316470&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/BitVector.h (original)
+++ llvm/trunk/include/llvm/ADT/BitVector.h Tue Oct 24 10:29:08 2017
@@ -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();
}
More information about the llvm-commits
mailing list