diff options
Diffstat (limited to 'libcxx/test/support/assert_checkpoint.h')
-rw-r--r-- | libcxx/test/support/assert_checkpoint.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libcxx/test/support/assert_checkpoint.h b/libcxx/test/support/assert_checkpoint.h index eea78efc39c..c83e0cf25e6 100644 --- a/libcxx/test/support/assert_checkpoint.h +++ b/libcxx/test/support/assert_checkpoint.h @@ -33,7 +33,13 @@ inline void clearCheckpoint() { globalCheckpoint() = Checkpoint{0}; } -#define CHECKPOINT(msg) globalCheckpoint() = Checkpoint{__FILE__, __PRETTY_FUNCTION__, __LINE__, msg} +#if defined(__GNUC__) +#define CHECKPOINT_FUNCTION_NAME __PRETTY_FUNCTION__ +#else +#define CHECKPOINT_FUNCTION_NAME __func__ +#endif + +#define CHECKPOINT(msg) globalCheckpoint() = Checkpoint{__FILE__, CHECKPOINT_FUNCTION_NAME, __LINE__, msg} inline void checkpointSignalHandler(int signal) { if (signal == SIGABRT) { |