[libcxx] r216949 - Partially address a FIXME in steady_clock::now()

Jonathan Roelofs jonathan at codesourcery.com
Tue Sep 2 16:59:37 PDT 2014


Yeah, my fault... fixed in r216997.


Cheers,

Jon

On 9/2/14, 5:51 PM, David Blaikie wrote:
> I'm seeing some build errors for libcxx on Linux (Ubuntu 14.04 LTS):
>
> /usr/local/google/home/blaikie/dev/llvm/src/projects/libcxx/include/__mutex_base:379:5:
> error: use of undeclared identifier 'steady_clock'
>      steady_clock::time_point __c_now = steady_clock::now();
>      ^
>
> Just taking a stab in teh dark that it's related to this commit? Or perhaps
> something else time related changed recently?
>
> Anything I can do to fix/debug/help with this?
>
>
> On Tue, Sep 2, 2014 at 2:14 PM, Jonathan Roelofs <jonathan at codesourcery.com
> <mailto:jonathan at codesourcery.com>> wrote:
>
>     Author: jroelofs
>     Date: Tue Sep  2 16:14:38 2014
>     New Revision: 216949
>
>     URL: http://llvm.org/viewvc/llvm-project?rev=216949&view=rev
>     Log:
>     Partially address a FIXME in steady_clock::now()
>
>     http://reviews.llvm.org/D4045
>
>     Modified:
>          libcxx/trunk/include/__config
>          libcxx/trunk/include/chrono
>          libcxx/trunk/src/chrono.cpp
>
>     libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
>          libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp
>
>     Modified: libcxx/trunk/include/__config
>     URL:
>     http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=216949&r1=216948&r2=216949&view=diff
>     ==============================================================================
>     --- libcxx/trunk/include/__config (original)
>     +++ libcxx/trunk/include/__config Tue Sep  2 16:14:38 2014
>     @@ -650,6 +650,11 @@ template <unsigned> struct __static_asse
>       #  define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1
>       #endif
>
>     +#if (!defined(_POSIX_TIMERS) || _POSIX_TIMERS <= 0) || \
>     +    (!defined(_POSIX_MONOTONIC_CLOCK) || _POSIX_MONOTONIC_CLOCK <= 0)
>     +#define _LIBCPP_HAS_NO_MONOTONIC_CLOCK
>     +#endif
>     +
>       #ifndef _LIBCPP_STD_VER
>       #  if  __cplusplus <= 201103L
>       #    define _LIBCPP_STD_VER 11
>
>     Modified: libcxx/trunk/include/chrono
>     URL:
>     http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/chrono?rev=216949&r1=216948&r2=216949&view=diff
>     ==============================================================================
>     --- libcxx/trunk/include/chrono (original)
>     +++ libcxx/trunk/include/chrono Tue Sep  2 16:14:38 2014
>     @@ -926,6 +926,7 @@ public:
>           static time_point from_time_t(time_t __t) _NOEXCEPT;
>       };
>
>     +#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
>       class _LIBCPP_TYPE_VIS steady_clock
>       {
>       public:
>     @@ -939,6 +940,9 @@ public:
>       };
>
>       typedef steady_clock high_resolution_clock;
>     +#else
>     +typedef system_clock high_resolution_clock;
>     +#endif
>
>       } // chrono
>
>
>     Modified: libcxx/trunk/src/chrono.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/chrono.cpp?rev=216949&r1=216948&r2=216949&view=diff
>     ==============================================================================
>     --- libcxx/trunk/src/chrono.cpp (original)
>     +++ libcxx/trunk/src/chrono.cpp Tue Sep  2 16:14:38 2014
>     @@ -46,6 +46,7 @@ system_clock::from_time_t(time_t t) _NOE
>           return system_clock::time_point(seconds(t));
>       }
>
>     +#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
>       // steady_clock
>
>       const bool steady_clock::is_steady;
>     @@ -127,6 +128,8 @@ steady_clock::now() _NOEXCEPT
>       }
>       #endif  // __APPLE__
>
>     +#endif // !_LIBCPP_HAS_NO_MONOTONIC_CLOCK
>     +
>       }
>
>       _LIBCPP_END_NAMESPACE_STD
>
>     Modified:
>     libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp?rev=216949&r1=216948&r2=216949&view=diff
>     ==============================================================================
>     ---
>     libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
>     (original)
>     +++
>     libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
>     Tue Sep  2 16:14:38 2014
>     @@ -11,6 +11,7 @@
>       // darwin11 and darwin12:
>       // XFAIL: with_system_lib=x86_64-apple-darwin11
>       // XFAIL: with_system_lib=x86_64-apple-darwin12
>     +// UNSUPPORTED: no-monotonic-clock
>
>       // <chrono>
>
>
>     Modified:
>     libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp?rev=216949&r1=216948&r2=216949&view=diff
>     ==============================================================================
>     ---
>     libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp
>     (original)
>     +++
>     libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp
>     Tue Sep  2 16:14:38 2014
>     @@ -6,6 +6,8 @@
>       // Source Licenses. See LICENSE.TXT for details.
>       //
>       //===----------------------------------------------------------------------===//
>     +//
>     +// UNSUPPORTED: no-monotonic-clock
>
>       // <chrono>
>
>
>
>     _______________________________________________
>     cfe-commits mailing list
>     cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
>     http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the cfe-commits mailing list