Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-11-09 23:55:41 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-11-09 23:55:41 +0300
commit2c03306341cde61b1de950e5303b855ed3720619 (patch)
tree51ab9ff1870c4d25138e5a17b134a3f3558b3227
parentc0035a492f2af2f6ceb435b2f824e1cc43e1e00f (diff)
Always provide Callstack() implementation, even if dummy.
This fixes usage with TRACY_HAS_CALLSTACK undefined, allowing compilation of otherwise unused functions, which are already protected from being called through macro redirections. See https://github.com/wolfpld/tracy/pull/492 for more information.
-rw-r--r--public/client/TracyCallstack.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/public/client/TracyCallstack.hpp b/public/client/TracyCallstack.hpp
index 5c24e7db..0b522b73 100644
--- a/public/client/TracyCallstack.hpp
+++ b/public/client/TracyCallstack.hpp
@@ -2,6 +2,7 @@
#define __TRACYCALLSTACK_HPP__
#include "../common/TracyApi.h"
+#include "../common/TracyForceInline.hpp"
#include "TracyCallstack.h"
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 5
@@ -11,7 +12,14 @@
#endif
-#ifdef TRACY_HAS_CALLSTACK
+#ifndef TRACY_HAS_CALLSTACK
+
+namespace tracy
+{
+static tracy_force_inline void* Callstack( int depth ) { return nullptr; }
+}
+
+#else
#ifdef TRACY_DEBUGINFOD
# include <elfutils/debuginfod.h>
@@ -21,7 +29,6 @@
#include <stdint.h>
#include "../common/TracyAlloc.hpp"
-#include "../common/TracyForceInline.hpp"
namespace tracy
{