[libcxx-commits] [PATCH] D91911: [libc++] Add a 'is-lockfree-runtime-function' lit feature

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 26 06:52:48 PST 2020


arichardson updated this revision to Diff 307861.
arichardson added a comment.

rebase after formatting change


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91911

Files:
  libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
  libcxx/utils/libcxx/test/features.py


Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -47,7 +47,14 @@
             #include <atomic>
             struct Large { int storage[100]; };
             std::atomic<Large> x;
-            int main(int, char**) { return x.load(), x.is_lock_free(); }
+            int main(int, char**) { (void)x.load(); return 0; }
+          """)),
+  Feature(name='is-lockfree-runtime-function',
+          when=lambda cfg: sourceBuilds(cfg, """
+            #include <atomic>
+            struct Large { int storage[100]; };
+            std::atomic<Large> x;
+            int main(int, char**) { return x.is_lock_free(); }
           """)),
 
   Feature(name='apple-clang',                                                                                                      when=_isAppleClang),
Index: libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
===================================================================
--- libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
+++ libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: libcpp-has-no-threads, c++03
-// REQUIRES: non-lockfree-atomics
+// REQUIRES: is-lockfree-runtime-function
 
 // GCC currently fails because it needs -fabi-version=6 to fix mangling of
 // std::atomic when used with __attribute__((vector(X))).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91911.307861.patch
Type: text/x-patch
Size: 1564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201126/44b22422/attachment.bin>


More information about the libcxx-commits mailing list