summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support/assert_checkpoint.h
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-04-28 22:28:23 +0000
committerEric Fiselier <eric@efcs.ca>2016-04-28 22:28:23 +0000
commit1f4231f8cf138c810a55a398c07a422908add70f (patch)
tree37862fd2450b478ac9fcaf5742d8e2ccdd65be43 /libcxx/test/support/assert_checkpoint.h
parent174f8b19815cef8507fe0dbf03e5e639f3a60ba9 (diff)
downloadbcm5719-llvm-1f4231f8cf138c810a55a398c07a422908add70f.tar.gz
bcm5719-llvm-1f4231f8cf138c810a55a398c07a422908add70f.zip
Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macros
llvm-svn: 267947
Diffstat (limited to 'libcxx/test/support/assert_checkpoint.h')
-rw-r--r--libcxx/test/support/assert_checkpoint.h8
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) {
OpenPOWER on IntegriCloud