From 939d35054881d150fe5d191d6965f6a09c5d0223 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 29 Dec 2018 10:19:01 -0500 Subject: SL-793: Add LL_PRETTY_FUNCTION macro wrapping __PRETTY_FUNCTION__ which is, of course, different in Visual Studio (__FUNCSIG__). Use LL_PRETTY_FUNCTION in DEBUG output instead of plain __FUNCTION__. --- indra/llcommon/llpreprocessor.h | 7 +++++++ indra/test/debug.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index e8f9981437..bae402110a 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -232,4 +232,11 @@ #define LL_COMPILE_TIME_MESSAGE(msg) #endif +// __FUNCTION__ works on all the platforms we care about, but... +#if LL_WINDOWS +#define LL_PRETTY_FUNCTION __FUNCSIG__ +#else +#define LL_PRETTY_FUNCTION __PRETTY_FUNCTION__ +#endif + #endif // not LL_LINDEN_PREPROCESSOR_H diff --git a/indra/test/debug.h b/indra/test/debug.h index d61eba651b..33c3ea2d27 100644 --- a/indra/test/debug.h +++ b/indra/test/debug.h @@ -64,7 +64,7 @@ private: // It's often convenient to use the name of the enclosing function as the name // of the Debug block. -#define DEBUG Debug debug(__FUNCTION__) +#define DEBUG Debug debug(LL_PRETTY_FUNCTION) // These BEGIN/END macros are specifically for debugging output -- please // don't assume you must use such for coroutines in general! They only help to -- cgit v1.2.3