mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 12:02:36 +08:00
Work around ABI break caused by C++17 inline variables.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@274403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
// Source Licenses. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define _LIBCPP_BUILDING_CHRONO
|
||||
#include "chrono"
|
||||
#include "cerrno" // errno
|
||||
#include "system_error" // __throw_system_error
|
||||
@@ -32,6 +32,9 @@ namespace chrono
|
||||
// system_clock
|
||||
|
||||
const bool system_clock::is_steady;
|
||||
// Make is_steady non-discardable in C++17
|
||||
// See PR28395 (https://llvm.org/bugs/show_bug.cgi?id=28395)
|
||||
static const bool& __is_steady_force_use1 __attribute__((used)) = system_clock::is_steady;
|
||||
|
||||
system_clock::time_point
|
||||
system_clock::now() _NOEXCEPT
|
||||
@@ -68,6 +71,10 @@ system_clock::from_time_t(time_t t) _NOEXCEPT
|
||||
// instead.
|
||||
|
||||
const bool steady_clock::is_steady;
|
||||
// Make is_steady non-discardable in C++17
|
||||
// See PR28395 (https://llvm.org/bugs/show_bug.cgi?id=28395)
|
||||
static const bool& __is_steady_force_use2 __attribute__((used)) = steady_clock::is_steady;
|
||||
|
||||
|
||||
#ifdef CLOCK_MONOTONIC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user