[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
Wed Nov 25 03:40:40 PST 2020


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

Correctly skip align.pass.pass.cpp for macOS


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
@@ -45,7 +45,13 @@
                                                                   #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.307573.patch
Type: text/x-patch
Size: 2148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201125/5e6980fe/attachment.bin>


More information about the libcxx-commits mailing list