[libcxx-commits] [PATCH] D111667: [libc++abi] Change LIBCXXABI_NO_TIMER to LIBCXXABI_USE_TIMER

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 12 14:32:31 PDT 2021


ldionne updated this revision to Diff 379191.
ldionne added a comment.

Fix incorrect #ifdef


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111667/new/

https://reviews.llvm.org/D111667

Files:
  libcxxabi/test/libcxxabi/test/config.py
  libcxxabi/test/support/timer.h
  libunwind/test/libunwind/test/config.py


Index: libunwind/test/libunwind/test/config.py
===================================================================
--- libunwind/test/libunwind/test/config.py
+++ libunwind/test/libunwind/test/config.py
@@ -39,7 +39,6 @@
             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']
Index: libcxxabi/test/support/timer.h
===================================================================
--- libcxxabi/test/support/timer.h
+++ libcxxabi/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 */
Index: libcxxabi/test/libcxxabi/test/config.py
===================================================================
--- libcxxabi/test/libcxxabi/test/config.py
+++ libcxxabi/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):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111667.379191.patch
Type: text/x-patch
Size: 1763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211012/65b9984b/attachment-0001.bin>


More information about the libcxx-commits mailing list