[libcxx-commits] [PATCH] D144490: [libc++abi] Adjust test_exception_storage.pass.cpp

Mikhail Maltsev via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 21 07:33:38 PST 2023


miyuki created this revision.
Herald added a project: All.
miyuki requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

Stop including the <unistd.h> and <__threading_support> headers in
single-threaded configurations (when these headers are not required).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144490

Files:
  libcxxabi/test/test_exception_storage.pass.cpp


Index: libcxxabi/test/test_exception_storage.pass.cpp
===================================================================
--- libcxxabi/test/test_exception_storage.pass.cpp
+++ libcxxabi/test/test_exception_storage.pass.cpp
@@ -9,13 +9,16 @@
 #include <algorithm>
 #include <cstdio>
 #include <cstdlib>
+
+#include "test_macros.h"
+
+#ifndef TEST_HAS_NO_THREADS
 #include <__threading_support>
 #include <unistd.h>
+#endif
 
 #include "../src/cxa_exception.h"
 
-#include "test_macros.h"
-
 typedef __cxxabiv1::__cxa_eh_globals globals_t ;
 
 void *thread_code (void *parm) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144490.499172.patch
Type: text/x-patch
Size: 576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230221/eda80aa6/attachment.bin>


More information about the libcxx-commits mailing list