Skip to content

Commit

Permalink
[libc++abi] Change LIBCXXABI_NO_TIMER to LIBCXXABI_USE_TIMER
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ldionne committed Oct 13, 2021
1 parent a3936a6 commit df3de76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion libcxxabi/test/libcxxabi/test/config.py
Expand Up @@ -44,7 +44,6 @@ def configure_features(self):

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):
Expand Down
8 changes: 4 additions & 4 deletions libcxxabi/test/support/timer.h
Expand Up @@ -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>
Expand Down Expand Up @@ -38,7 +38,7 @@ class timer
TimePoint m_start;
};

#else /* LIBCXXABI_NO_TIMER */
#else /* LIBCXXABI_USE_TIMER */

class timer
{
Expand All @@ -49,6 +49,6 @@ class timer
~timer() {}
};

#endif /* LIBCXXABI_NO_TIMER */
#endif /* LIBCXXABI_USE_TIMER */

#endif /* TIMER_H */
1 change: 0 additions & 1 deletion libunwind/test/libunwind/test/config.py
Expand Up @@ -39,7 +39,6 @@ def configure_features(self):
self.config.available_features.add('libunwind-arm-ehabi')

def configure_compile_flags(self):
self.cxx.compile_flags += ['-DLIBUNWIND_NO_TIMER']
# Stack unwinding tests need unwinding tables and these are not
# generated by default on all Targets.
self.cxx.compile_flags += ['-funwind-tables']
Expand Down

0 comments on commit df3de76

Please sign in to comment.