From 5bd910a32223537b3f3370ec01d2851729dfa556 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Wed, 3 Jul 2019 15:21:27 +0200 Subject: [PATCH] Simplify utils --- tracetools/include/tracetools/utils.hpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tracetools/include/tracetools/utils.hpp b/tracetools/include/tracetools/utils.hpp index 5a0d995..57d1ff6 100644 --- a/tracetools/include/tracetools/utils.hpp +++ b/tracetools/include/tracetools/utils.hpp @@ -24,17 +24,6 @@ const char * _demangle_symbol(const char * mangled); const char * _get_symbol_funcptr(void * funcptr); -template -const char * _get_symbol_non_funcptr(std::function f) -{ -#if defined(TRACETOOLS_LTTNG_ENABLED) && !defined(_WIN32) - return _demangle_symbol(f.target_type().name()); -#else - (void)f; - return SYMBOL_UNKNOWN; -#endif -} - template const char * get_symbol(std::function f) { @@ -47,7 +36,7 @@ const char * get_symbol(std::function f) return _get_symbol_funcptr(funcptr); } // Otherwise we have to go through target_type() - return _get_symbol_non_funcptr(f); + return _demangle_symbol(f.target_type().name()); #else (void)f; return SYMBOL_UNKNOWN;