From 93110c2fe46c080bb016f5d9e8d9554b2d787ad7 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 8 Mar 2019 10:43:56 +0000 Subject: [PATCH] Make function definition in header inline Otherwise including this header from more than one place will break linking. llvm-svn: 355684 --- lldb/include/lldb/Utility/ReproducerInstrumentation.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h index 7ceec9b..7f8f2ae 100644 --- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h +++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h @@ -22,40 +22,40 @@ template ::value, int>::type = 0> -void log_append(llvm::raw_string_ostream &ss, const T &t) { +inline void log_append(llvm::raw_string_ostream &ss, const T &t) { ss << t; } template ::value, int>::type = 0> -void log_append(llvm::raw_string_ostream &ss, const T &t) { +inline void log_append(llvm::raw_string_ostream &ss, const T &t) { ss << &t; } template -void log_append(llvm::raw_string_ostream &ss, const T *t) { +inline void log_append(llvm::raw_string_ostream &ss, const T *t) { ss << t; } -inline template <> -void log_append(llvm::raw_string_ostream &ss, const char *t) { +template <> +inline void log_append(llvm::raw_string_ostream &ss, const char *t) { ss << t; } template -void log_helper(llvm::raw_string_ostream &ss, const Head &head) { +inline void log_helper(llvm::raw_string_ostream &ss, const Head &head) { log_append(ss, head); } template -void log_helper(llvm::raw_string_ostream &ss, const Head &head, - const Tail &... tail) { +inline void log_helper(llvm::raw_string_ostream &ss, const Head &head, + const Tail &... tail) { log_append(ss, head); ss << ", "; log_helper(ss, tail...); } -template std::string log_args(const Ts &... ts) { +template inline std::string log_args(const Ts &... ts) { std::string buffer; llvm::raw_string_ostream ss(buffer); log_helper(ss, ts...); -- 2.7.4