From 124aa38d31b7dfd2e8a80311d0db782ebcf29cc6 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 24 Oct 2017 17:29:11 +0000 Subject: [PATCH] SmallVector.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@316472 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/SmallVector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index b3c2d836d16..a9ac98d1ad4 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -927,8 +927,8 @@ public: } }; -template -static inline size_t capacity_in_bytes(const SmallVector &X) { +template +inline size_t capacity_in_bytes(const SmallVector &X) { return X.capacity_in_bytes(); } -- 2.40.0