diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-07-18 03:00:09 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-07-18 03:00:09 +0000 |
commit | fb946da259d26e703c8da7f7cb155fa244757f75 (patch) | |
tree | e582e9d6168226ea1c961c1e6ee664cb9aa54dfd /libcxx/test/support | |
parent | 03f46fc2eda586c946f875195db87b942d139452 (diff) | |
download | bcm5719-llvm-fb946da259d26e703c8da7f7cb155fa244757f75.tar.gz bcm5719-llvm-fb946da259d26e703c8da7f7cb155fa244757f75.zip |
Add checkpoint diagnostics to help diagnose buildbot failures.
llvm-svn: 275754
Diffstat (limited to 'libcxx/test/support')
-rw-r--r-- | libcxx/test/support/assert_checkpoint.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libcxx/test/support/assert_checkpoint.h b/libcxx/test/support/assert_checkpoint.h index cf03328bbe1..6627b35eb30 100644 --- a/libcxx/test/support/assert_checkpoint.h +++ b/libcxx/test/support/assert_checkpoint.h @@ -11,6 +11,11 @@ struct Checkpoint { int line; const char* msg; + Checkpoint() : file(nullptr), func(nullptr), line(-1), msg(nullptr) {} + Checkpoint(const char* xfile, const char* xfunc, int xline, const char* xmsg) + : file(xfile), func(xfunc), line(xline), msg(xmsg) + {} + template <class Stream> void print(Stream& s) const { if (!file) { @@ -30,7 +35,7 @@ inline Checkpoint& globalCheckpoint() { } inline void clearCheckpoint() { - globalCheckpoint() = {}; + globalCheckpoint() = Checkpoint(); } #if defined(__GNUC__) @@ -39,7 +44,7 @@ inline void clearCheckpoint() { #define CHECKPOINT_FUNCTION_NAME __func__ #endif -#define CHECKPOINT(msg) globalCheckpoint() = Checkpoint{__FILE__, CHECKPOINT_FUNCTION_NAME, __LINE__, msg} +#define CHECKPOINT(msg) globalCheckpoint() = Checkpoint(__FILE__, CHECKPOINT_FUNCTION_NAME, __LINE__, msg); inline void checkpointSignalHandler(int signal) { if (signal == SIGABRT) { |