<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 1, 2016 at 4:22 PM, Eric Fiselier via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ericwf<br>
Date: Fri Jul  1 18:22:25 2016<br>
New Revision: 274403<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=274403&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=274403&view=rev</a><br>
Log:<br>
Work around ABI break caused by C++17 inline variables.<br>
<br>
Modified:<br>
    libcxx/trunk/src/chrono.cpp<br>
<br>
Modified: libcxx/trunk/src/chrono.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/chrono.cpp?rev=274403&r1=274402&r2=274403&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/chrono.cpp?rev=274403&r1=274402&r2=274403&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/src/chrono.cpp (original)<br>
+++ libcxx/trunk/src/chrono.cpp Fri Jul  1 18:22:25 2016<br>
@@ -6,7 +6,7 @@<br>
 // Source Licenses. See LICENSE.TXT for details.<br>
 //<br>
 //===----------------------------------------------------------------------===//<br>
-<br>
+#define _LIBCPP_BUILDING_CHRONO<br>
 #include "chrono"<br>
 #include "cerrno"        // errno<br>
 #include "system_error"  // __throw_system_error<br>
@@ -32,6 +32,9 @@ namespace chrono<br>
 // system_clock<br>
<br>
 const bool system_clock::is_steady;<br></blockquote><div><br></div><div>Can you mark this as __attribute__((used)) instead of adding a separate use?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+// Make is_steady non-discardable in C++17<br>
+// See PR28395 (<a href="https://llvm.org/bugs/show_bug.cgi?id=28395" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=28395</a>)<br>
+static const bool& __is_steady_force_use1 __attribute__((used)) = system_clock::is_steady;<br>
<br>
 system_clock::time_point<br>
 system_clock::now() _NOEXCEPT<br>
@@ -68,6 +71,10 @@ system_clock::from_time_t(time_t t) _NOE<br>
 //  instead.<br>
<br>
 const bool steady_clock::is_steady;<br>
+// Make is_steady non-discardable in C++17<br>
+// See PR28395 (<a href="https://llvm.org/bugs/show_bug.cgi?id=28395" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=28395</a>)<br>
+static const bool& __is_steady_force_use2 __attribute__((used)) = steady_clock::is_steady;<br>
+<br>
<br>
 #ifdef CLOCK_MONOTONIC<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>