diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2018-12-29 10:19:01 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2020-03-25 18:39:20 -0400 |
commit | 939d35054881d150fe5d191d6965f6a09c5d0223 (patch) | |
tree | 20f9971348d19fef9d620fdc7b319e6c53ac393e | |
parent | 0c32c98f25f3f7d99a244a249dc08b03cd36a5b0 (diff) |
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__.
-rw-r--r-- | indra/llcommon/llpreprocessor.h | 7 | ||||
-rw-r--r-- | indra/test/debug.h | 2 |
2 files changed, 8 insertions, 1 deletions
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 |