[libc++abi] Change LIBCXXABI_NO_TIMER to LIBCXXABI_USE_TIMER
Instead of always defining LIBCXXABI_NO_TIMER to run the tests, only
define LIBCXXABI_USE_TIMER when we want to enable the timer. This makes
the libc++abi testing configuration simpler.
As a fly-by fix, remove the unused LIBUNWIND_NO_TIMER macro from libunwind.
Differential Revision: https://reviews.llvm.org/D111667
GitOrigin-RevId: df3de7647e034797ae3c965d6737bc0a4bc7a779
diff --git a/test/libcxxabi/test/config.py b/test/libcxxabi/test/config.py
index 843441f..5855240 100644
--- a/test/libcxxabi/test/config.py
+++ b/test/libcxxabi/test/config.py
@@ -44,7 +44,6 @@
def configure_compile_flags(self):
self.cxx.compile_flags += [
- '-DLIBCXXABI_NO_TIMER',
'-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS',
]
if self.get_lit_bool('enable_exceptions', True):
diff --git a/test/support/timer.h b/test/support/timer.h
index 7109627..27dc5f6 100644
--- a/test/support/timer.h
+++ b/test/support/timer.h
@@ -9,8 +9,8 @@
#ifndef TIMER_H
#define TIMER_H
-// Define LIBCXXABI_NO_TIMER to disable testing with a timer.
-#ifndef LIBCXXABI_NO_TIMER
+// Define LIBCXXABI_USE_TIMER to enable testing with a timer.
+#if defined(LIBCXXABI_USE_TIMER)
#include <chrono>
#include <cstdio>
@@ -38,7 +38,7 @@
TimePoint m_start;
};
-#else /* LIBCXXABI_NO_TIMER */
+#else /* LIBCXXABI_USE_TIMER */
class timer
{
@@ -49,6 +49,6 @@
~timer() {}
};
-#endif /* LIBCXXABI_NO_TIMER */
+#endif /* LIBCXXABI_USE_TIMER */
#endif /* TIMER_H */