From b86addfb2351575fd39f21b619e4be2cbe136dc7 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 24 Oct 2017 17:29:11 +0000 Subject: [PATCH] DenseMap.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@316471 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/DenseMap.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 2c547e3b6e5..ba60b7972a8 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -1214,9 +1214,8 @@ private: } }; -template -static inline size_t -capacity_in_bytes(const DenseMap &X) { +template +inline size_t capacity_in_bytes(const DenseMap &X) { return X.getMemorySize(); }