[libcxx-commits] [libcxxabi] r368604 - libcxxabi: Rename .hpp files to .h
Nico Weber via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 12 12:11:24 PDT 2019
Author: nico
Date: Mon Aug 12 12:11:23 2019
New Revision: 368604
URL: http://llvm.org/viewvc/llvm-project?rev=368604&view=rev
Log:
libcxxabi: Rename .hpp files to .h
LLVM uses .h as its extension for header files.
Differential Revision: https://reviews.llvm.org/D65981
Added:
libcxxabi/trunk/src/cxa_exception.h
libcxxabi/trunk/src/cxa_handlers.h
libcxxabi/trunk/test/support/timer.h
Removed:
libcxxabi/trunk/src/cxa_exception.hpp
libcxxabi/trunk/src/cxa_handlers.hpp
libcxxabi/trunk/test/support/timer.hpp
Modified:
libcxxabi/trunk/src/cxa_default_handlers.cpp
libcxxabi/trunk/src/cxa_exception.cpp
libcxxabi/trunk/src/cxa_exception_storage.cpp
libcxxabi/trunk/src/cxa_handlers.cpp
libcxxabi/trunk/src/cxa_noexception.cpp
libcxxabi/trunk/src/cxa_personality.cpp
libcxxabi/trunk/src/cxa_unexpected.cpp
libcxxabi/trunk/test/dynamic_cast14.pass.cpp
libcxxabi/trunk/test/dynamic_cast3.pass.cpp
libcxxabi/trunk/test/dynamic_cast5.pass.cpp
libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp
libcxxabi/trunk/test/test_demangle.pass.cpp
libcxxabi/trunk/test/test_exception_storage.pass.cpp
Modified: libcxxabi/trunk/src/cxa_default_handlers.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_default_handlers.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_default_handlers.cpp (original)
+++ libcxxabi/trunk/src/cxa_default_handlers.cpp Mon Aug 12 12:11:23 2019
@@ -14,8 +14,8 @@
#include <cstdlib>
#include "abort_message.h"
#include "cxxabi.h"
-#include "cxa_handlers.hpp"
-#include "cxa_exception.hpp"
+#include "cxa_handlers.h"
+#include "cxa_exception.h"
#include "private_typeinfo.h"
#include "include/atomic_support.h"
Modified: libcxxabi/trunk/src/cxa_exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Mon Aug 12 12:11:23 2019
@@ -14,8 +14,8 @@
#include <exception> // for std::terminate
#include <cstring> // for memset
-#include "cxa_exception.hpp"
-#include "cxa_handlers.hpp"
+#include "cxa_exception.h"
+#include "cxa_handlers.h"
#include "fallback_malloc.h"
#include "include/atomic_support.h"
Added: libcxxabi/trunk/src/cxa_exception.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.h?rev=368604&view=auto
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.h (added)
+++ libcxxabi/trunk/src/cxa_exception.h Mon Aug 12 12:11:23 2019
@@ -0,0 +1,119 @@
+//===------------------------- cxa_exception.h ----------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//
+// This file implements the "Exception Handling APIs"
+// https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _CXA_EXCEPTION_H
+#define _CXA_EXCEPTION_H
+
+#include <exception> // for std::unexpected_handler and std::terminate_handler
+#include "cxxabi.h"
+#include "unwind.h"
+
+namespace __cxxabiv1 {
+
+static const uint64_t kOurExceptionClass = 0x434C4E47432B2B00; // CLNGC++\0
+static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
+static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
+
+uint64_t __getExceptionClass (const _Unwind_Exception*);
+void __setExceptionClass ( _Unwind_Exception*, uint64_t);
+bool __isOurExceptionClass(const _Unwind_Exception*);
+
+struct _LIBCXXABI_HIDDEN __cxa_exception {
+#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
+ // This is a new field to support C++ 0x exception_ptr.
+ // For binary compatibility it is at the start of this
+ // struct which is prepended to the object thrown in
+ // __cxa_allocate_exception.
+ size_t referenceCount;
+#endif
+
+ // Manage the exception object itself.
+ std::type_info *exceptionType;
+ void (*exceptionDestructor)(void *);
+ std::unexpected_handler unexpectedHandler;
+ std::terminate_handler terminateHandler;
+
+ __cxa_exception *nextException;
+
+ int handlerCount;
+
+#if defined(_LIBCXXABI_ARM_EHABI)
+ __cxa_exception* nextPropagatingException;
+ int propagationCount;
+#else
+ int handlerSwitchValue;
+ const unsigned char *actionRecord;
+ const unsigned char *languageSpecificData;
+ void *catchTemp;
+ void *adjustedPtr;
+#endif
+
+#if !defined(__LP64__) && !defined(_LIBCXXABI_ARM_EHABI)
+ // This is a new field to support C++ 0x exception_ptr.
+ // For binary compatibility it is placed where the compiler
+ // previously adding padded to 64-bit align unwindHeader.
+ size_t referenceCount;
+#endif
+ _Unwind_Exception unwindHeader;
+};
+
+// http://sourcery.mentor.com/archives/cxx-abi-dev/msg01924.html
+// The layout of this structure MUST match the layout of __cxa_exception, with
+// primaryException instead of referenceCount.
+struct _LIBCXXABI_HIDDEN __cxa_dependent_exception {
+#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
+ void* primaryException;
+#endif
+
+ std::type_info *exceptionType;
+ void (*exceptionDestructor)(void *);
+ std::unexpected_handler unexpectedHandler;
+ std::terminate_handler terminateHandler;
+
+ __cxa_exception *nextException;
+
+ int handlerCount;
+
+#if defined(_LIBCXXABI_ARM_EHABI)
+ __cxa_exception* nextPropagatingException;
+ int propagationCount;
+#else
+ int handlerSwitchValue;
+ const unsigned char *actionRecord;
+ const unsigned char *languageSpecificData;
+ void * catchTemp;
+ void *adjustedPtr;
+#endif
+
+#if !defined(__LP64__) && !defined(_LIBCXXABI_ARM_EHABI)
+ void* primaryException;
+#endif
+ _Unwind_Exception unwindHeader;
+};
+
+struct _LIBCXXABI_HIDDEN __cxa_eh_globals {
+ __cxa_exception * caughtExceptions;
+ unsigned int uncaughtExceptions;
+#if defined(_LIBCXXABI_ARM_EHABI)
+ __cxa_exception* propagatingExceptions;
+#endif
+};
+
+extern "C" _LIBCXXABI_FUNC_VIS __cxa_eh_globals * __cxa_get_globals ();
+extern "C" _LIBCXXABI_FUNC_VIS __cxa_eh_globals * __cxa_get_globals_fast ();
+
+extern "C" _LIBCXXABI_FUNC_VIS void * __cxa_allocate_dependent_exception ();
+extern "C" _LIBCXXABI_FUNC_VIS void __cxa_free_dependent_exception (void * dependent_exception);
+
+} // namespace __cxxabiv1
+
+#endif // _CXA_EXCEPTION_H
Removed: libcxxabi/trunk/src/cxa_exception.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.hpp?rev=368603&view=auto
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.hpp (original)
+++ libcxxabi/trunk/src/cxa_exception.hpp (removed)
@@ -1,119 +0,0 @@
-//===------------------------- cxa_exception.hpp --------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//
-// This file implements the "Exception Handling APIs"
-// https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _CXA_EXCEPTION_H
-#define _CXA_EXCEPTION_H
-
-#include <exception> // for std::unexpected_handler and std::terminate_handler
-#include "cxxabi.h"
-#include "unwind.h"
-
-namespace __cxxabiv1 {
-
-static const uint64_t kOurExceptionClass = 0x434C4E47432B2B00; // CLNGC++\0
-static const uint64_t kOurDependentExceptionClass = 0x434C4E47432B2B01; // CLNGC++\1
-static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
-
-uint64_t __getExceptionClass (const _Unwind_Exception*);
-void __setExceptionClass ( _Unwind_Exception*, uint64_t);
-bool __isOurExceptionClass(const _Unwind_Exception*);
-
-struct _LIBCXXABI_HIDDEN __cxa_exception {
-#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
- // This is a new field to support C++ 0x exception_ptr.
- // For binary compatibility it is at the start of this
- // struct which is prepended to the object thrown in
- // __cxa_allocate_exception.
- size_t referenceCount;
-#endif
-
- // Manage the exception object itself.
- std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
- std::unexpected_handler unexpectedHandler;
- std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
-#if defined(_LIBCXXABI_ARM_EHABI)
- __cxa_exception* nextPropagatingException;
- int propagationCount;
-#else
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void *catchTemp;
- void *adjustedPtr;
-#endif
-
-#if !defined(__LP64__) && !defined(_LIBCXXABI_ARM_EHABI)
- // This is a new field to support C++ 0x exception_ptr.
- // For binary compatibility it is placed where the compiler
- // previously adding padded to 64-bit align unwindHeader.
- size_t referenceCount;
-#endif
- _Unwind_Exception unwindHeader;
-};
-
-// http://sourcery.mentor.com/archives/cxx-abi-dev/msg01924.html
-// The layout of this structure MUST match the layout of __cxa_exception, with
-// primaryException instead of referenceCount.
-struct _LIBCXXABI_HIDDEN __cxa_dependent_exception {
-#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
- void* primaryException;
-#endif
-
- std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
- std::unexpected_handler unexpectedHandler;
- std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
-#if defined(_LIBCXXABI_ARM_EHABI)
- __cxa_exception* nextPropagatingException;
- int propagationCount;
-#else
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void * catchTemp;
- void *adjustedPtr;
-#endif
-
-#if !defined(__LP64__) && !defined(_LIBCXXABI_ARM_EHABI)
- void* primaryException;
-#endif
- _Unwind_Exception unwindHeader;
-};
-
-struct _LIBCXXABI_HIDDEN __cxa_eh_globals {
- __cxa_exception * caughtExceptions;
- unsigned int uncaughtExceptions;
-#if defined(_LIBCXXABI_ARM_EHABI)
- __cxa_exception* propagatingExceptions;
-#endif
-};
-
-extern "C" _LIBCXXABI_FUNC_VIS __cxa_eh_globals * __cxa_get_globals ();
-extern "C" _LIBCXXABI_FUNC_VIS __cxa_eh_globals * __cxa_get_globals_fast ();
-
-extern "C" _LIBCXXABI_FUNC_VIS void * __cxa_allocate_dependent_exception ();
-extern "C" _LIBCXXABI_FUNC_VIS void __cxa_free_dependent_exception (void * dependent_exception);
-
-} // namespace __cxxabiv1
-
-#endif // _CXA_EXCEPTION_H
Modified: libcxxabi/trunk/src/cxa_exception_storage.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception_storage.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception_storage.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception_storage.cpp Mon Aug 12 12:11:23 2019
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "cxa_exception.hpp"
+#include "cxa_exception.h"
#include <__threading_support>
Modified: libcxxabi/trunk/src/cxa_handlers.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_handlers.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_handlers.cpp (original)
+++ libcxxabi/trunk/src/cxa_handlers.cpp Mon Aug 12 12:11:23 2019
@@ -14,8 +14,8 @@
#include <exception>
#include "abort_message.h"
#include "cxxabi.h"
-#include "cxa_handlers.hpp"
-#include "cxa_exception.hpp"
+#include "cxa_handlers.h"
+#include "cxa_exception.h"
#include "private_typeinfo.h"
#include "include/atomic_support.h"
Added: libcxxabi/trunk/src/cxa_handlers.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_handlers.h?rev=368604&view=auto
==============================================================================
--- libcxxabi/trunk/src/cxa_handlers.h (added)
+++ libcxxabi/trunk/src/cxa_handlers.h Mon Aug 12 12:11:23 2019
@@ -0,0 +1,55 @@
+//===------------------------- cxa_handlers.h -----------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//
+// This file implements the functionality associated with the terminate_handler,
+// unexpected_handler, and new_handler.
+//===----------------------------------------------------------------------===//
+
+#ifndef _CXA_HANDLERS_H
+#define _CXA_HANDLERS_H
+
+#include <__cxxabi_config.h>
+
+#include <exception>
+
+namespace std
+{
+
+_LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN
+void
+__unexpected(unexpected_handler func);
+
+_LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN
+void
+__terminate(terminate_handler func) _NOEXCEPT;
+
+} // std
+
+extern "C"
+{
+
+_LIBCXXABI_DATA_VIS extern void (*__cxa_terminate_handler)();
+_LIBCXXABI_DATA_VIS extern void (*__cxa_unexpected_handler)();
+_LIBCXXABI_DATA_VIS extern void (*__cxa_new_handler)();
+
+/*
+
+ At some point in the future these three symbols will become
+ C++11 atomic variables:
+
+ extern std::atomic<std::terminate_handler> __cxa_terminate_handler;
+ extern std::atomic<std::unexpected_handler> __cxa_unexpected_handler;
+ extern std::atomic<std::new_handler> __cxa_new_handler;
+
+ This change will not impact their ABI. But it will allow for a
+ portable performance optimization.
+
+*/
+
+} // extern "C"
+
+#endif // _CXA_HANDLERS_H
Removed: libcxxabi/trunk/src/cxa_handlers.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_handlers.hpp?rev=368603&view=auto
==============================================================================
--- libcxxabi/trunk/src/cxa_handlers.hpp (original)
+++ libcxxabi/trunk/src/cxa_handlers.hpp (removed)
@@ -1,55 +0,0 @@
-//===------------------------- cxa_handlers.cpp ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//
-// This file implements the functionality associated with the terminate_handler,
-// unexpected_handler, and new_handler.
-//===----------------------------------------------------------------------===//
-
-#ifndef _CXA_HANDLERS_H
-#define _CXA_HANDLERS_H
-
-#include <__cxxabi_config.h>
-
-#include <exception>
-
-namespace std
-{
-
-_LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN
-void
-__unexpected(unexpected_handler func);
-
-_LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN
-void
-__terminate(terminate_handler func) _NOEXCEPT;
-
-} // std
-
-extern "C"
-{
-
-_LIBCXXABI_DATA_VIS extern void (*__cxa_terminate_handler)();
-_LIBCXXABI_DATA_VIS extern void (*__cxa_unexpected_handler)();
-_LIBCXXABI_DATA_VIS extern void (*__cxa_new_handler)();
-
-/*
-
- At some point in the future these three symbols will become
- C++11 atomic variables:
-
- extern std::atomic<std::terminate_handler> __cxa_terminate_handler;
- extern std::atomic<std::unexpected_handler> __cxa_unexpected_handler;
- extern std::atomic<std::new_handler> __cxa_new_handler;
-
- This change will not impact their ABI. But it will allow for a
- portable performance optimization.
-
-*/
-
-} // extern "C"
-
-#endif // _CXA_HANDLERS_H
Modified: libcxxabi/trunk/src/cxa_noexception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_noexception.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_noexception.cpp (original)
+++ libcxxabi/trunk/src/cxa_noexception.cpp Mon Aug 12 12:11:23 2019
@@ -15,8 +15,8 @@
#include "cxxabi.h"
#include <exception> // for std::terminate
-#include "cxa_exception.hpp"
-#include "cxa_handlers.hpp"
+#include "cxa_exception.h"
+#include "cxa_handlers.h"
namespace __cxxabiv1 {
Modified: libcxxabi/trunk/src/cxa_personality.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_personality.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_personality.cpp (original)
+++ libcxxabi/trunk/src/cxa_personality.cpp Mon Aug 12 12:11:23 2019
@@ -17,8 +17,8 @@
#include <typeinfo>
#include "__cxxabi_config.h"
-#include "cxa_exception.hpp"
-#include "cxa_handlers.hpp"
+#include "cxa_exception.h"
+#include "cxa_handlers.h"
#include "private_typeinfo.h"
#include "unwind.h"
Modified: libcxxabi/trunk/src/cxa_unexpected.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_unexpected.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_unexpected.cpp (original)
+++ libcxxabi/trunk/src/cxa_unexpected.cpp Mon Aug 12 12:11:23 2019
@@ -8,7 +8,7 @@
#include <exception>
#include "cxxabi.h"
-#include "cxa_exception.hpp"
+#include "cxa_exception.h"
namespace __cxxabiv1
{
Modified: libcxxabi/trunk/test/dynamic_cast14.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/dynamic_cast14.pass.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/test/dynamic_cast14.pass.cpp (original)
+++ libcxxabi/trunk/test/dynamic_cast14.pass.cpp Mon Aug 12 12:11:23 2019
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <cassert>
-#include "support/timer.hpp"
+#include "support/timer.h"
namespace t1
{
Modified: libcxxabi/trunk/test/dynamic_cast3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/dynamic_cast3.pass.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/test/dynamic_cast3.pass.cpp (original)
+++ libcxxabi/trunk/test/dynamic_cast3.pass.cpp Mon Aug 12 12:11:23 2019
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <cassert>
-#include "support/timer.hpp"
+#include "support/timer.h"
// This test explicitly tests dynamic cast with types that have inaccessible
// bases.
Modified: libcxxabi/trunk/test/dynamic_cast5.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/dynamic_cast5.pass.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/test/dynamic_cast5.pass.cpp (original)
+++ libcxxabi/trunk/test/dynamic_cast5.pass.cpp Mon Aug 12 12:11:23 2019
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include <cassert>
-#include "support/timer.hpp"
+#include "support/timer.h"
// This test explicitly tests dynamic cast with types that have inaccessible
// bases.
Modified: libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp (original)
+++ libcxxabi/trunk/test/dynamic_cast_stress.pass.cpp Mon Aug 12 12:11:23 2019
@@ -10,7 +10,7 @@
#include <cassert>
#include <tuple>
-#include "support/timer.hpp"
+#include "support/timer.h"
template <std::size_t Indx, std::size_t Depth>
struct C
Added: libcxxabi/trunk/test/support/timer.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/support/timer.h?rev=368604&view=auto
==============================================================================
--- libcxxabi/trunk/test/support/timer.h (added)
+++ libcxxabi/trunk/test/support/timer.h Mon Aug 12 12:11:23 2019
@@ -0,0 +1,54 @@
+//===----------------------------------------------------------------------===////
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===////
+
+#ifndef TIMER_HPP
+#define TIMER_HPP
+
+// Define LIBCXXABI_NO_TIMER to disable testing with a timer.
+#ifndef LIBCXXABI_NO_TIMER
+
+#include <chrono>
+#include <iostream>
+
+class timer
+{
+ typedef std::chrono::high_resolution_clock Clock;
+ typedef Clock::time_point TimePoint;
+ typedef std::chrono::microseconds MicroSeconds;
+public:
+ timer() : m_start(Clock::now()) {}
+
+ timer(timer const &) = delete;
+ timer & operator=(timer const &) = delete;
+
+ ~timer()
+ {
+ using std::chrono::duration_cast;
+ TimePoint end = Clock::now();
+ MicroSeconds us = duration_cast<MicroSeconds>(end - m_start);
+ std::cout << us.count() << " microseconds\n";
+ }
+
+private:
+ TimePoint m_start;
+};
+
+#else /* LIBCXXABI_NO_TIMER */
+
+class timer
+{
+public:
+ timer() {}
+ timer(timer const &) = delete;
+ timer & operator=(timer const &) = delete;
+ ~timer() {}
+};
+
+#endif /* LIBCXXABI_NO_TIMER */
+
+#endif /* TIMER_HPP */
Removed: libcxxabi/trunk/test/support/timer.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/support/timer.hpp?rev=368603&view=auto
==============================================================================
--- libcxxabi/trunk/test/support/timer.hpp (original)
+++ libcxxabi/trunk/test/support/timer.hpp (removed)
@@ -1,54 +0,0 @@
-//===----------------------------------------------------------------------===////
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===////
-
-#ifndef TIMER_HPP
-#define TIMER_HPP
-
-// Define LIBCXXABI_NO_TIMER to disable testing with a timer.
-#ifndef LIBCXXABI_NO_TIMER
-
-#include <chrono>
-#include <iostream>
-
-class timer
-{
- typedef std::chrono::high_resolution_clock Clock;
- typedef Clock::time_point TimePoint;
- typedef std::chrono::microseconds MicroSeconds;
-public:
- timer() : m_start(Clock::now()) {}
-
- timer(timer const &) = delete;
- timer & operator=(timer const &) = delete;
-
- ~timer()
- {
- using std::chrono::duration_cast;
- TimePoint end = Clock::now();
- MicroSeconds us = duration_cast<MicroSeconds>(end - m_start);
- std::cout << us.count() << " microseconds\n";
- }
-
-private:
- TimePoint m_start;
-};
-
-#else /* LIBCXXABI_NO_TIMER */
-
-class timer
-{
-public:
- timer() {}
- timer(timer const &) = delete;
- timer & operator=(timer const &) = delete;
- ~timer() {}
-};
-
-#endif /* LIBCXXABI_NO_TIMER */
-
-#endif /* TIMER_HPP */
Modified: libcxxabi/trunk/test/test_demangle.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.pass.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.pass.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.pass.cpp Mon Aug 12 12:11:23 2019
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "support/timer.hpp"
+#include "support/timer.h"
#include <iostream>
#include <string>
#include <cstdlib>
Modified: libcxxabi/trunk/test/test_exception_storage.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_exception_storage.pass.cpp?rev=368604&r1=368603&r2=368604&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_exception_storage.pass.cpp (original)
+++ libcxxabi/trunk/test/test_exception_storage.pass.cpp Mon Aug 12 12:11:23 2019
@@ -12,7 +12,7 @@
#include <__threading_support>
#include <unistd.h>
-#include "../src/cxa_exception.hpp"
+#include "../src/cxa_exception.h"
typedef __cxxabiv1::__cxa_eh_globals globals_t ;
More information about the libcxx-commits
mailing list