From aedf1537c67b0fe0a496f1052829ca10c3e58d69 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. llvm-svn: 316472 --- llvm/include/llvm/ADT/SmallVector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index b3c2d83..a9ac98d 100644 --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/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.7.4