mirror of
https://github.com/verilator/verilator.git
synced 2024-12-29 10:47:34 +00:00
libcxx has removed the experimental/coroutine include file in favor of the C++20-standard coroutine include. If the latter is available we use it otherwise falling back to the existing experimental version (in which case we also disable the deprecated-experimental-coroutine warning). (See also https://reviews.llvm.org/D108697.)
This commit is contained in:
parent
1537c9badc
commit
9ff06c1664
@ -146,6 +146,7 @@ Nathan Myers
|
|||||||
Nolan Poe
|
Nolan Poe
|
||||||
Oleh Maksymenko
|
Oleh Maksymenko
|
||||||
Patrick Stewart
|
Patrick Stewart
|
||||||
|
Paul Bowen-Huggett
|
||||||
Paul Swirhun
|
Paul Swirhun
|
||||||
Paul Wright
|
Paul Wright
|
||||||
Pawel Jewstafjew
|
Pawel Jewstafjew
|
||||||
|
@ -32,14 +32,18 @@
|
|||||||
// clang-format off
|
// clang-format off
|
||||||
// Some preprocessor magic to support both Clang and GCC coroutines with both libc++ and libstdc++
|
// Some preprocessor magic to support both Clang and GCC coroutines with both libc++ and libstdc++
|
||||||
#if defined _LIBCPP_VERSION // libc++
|
#if defined _LIBCPP_VERSION // libc++
|
||||||
# if __clang_major__ > 13 // Clang > 13 warns that coroutine types in std::experimental are deprecated
|
# if defined(__has_include) && !__has_include(<coroutine>) && __has_include(<experimental/coroutine>)
|
||||||
# pragma clang diagnostic push
|
# if __clang_major__ > 13 // Clang > 13 warns that coroutine types in std::experimental are deprecated
|
||||||
# pragma clang diagnostic ignored "-Wdeprecated-experimental-coroutine"
|
# pragma clang diagnostic push
|
||||||
|
# pragma clang diagnostic ignored "-Wdeprecated-experimental-coroutine"
|
||||||
|
# endif
|
||||||
|
# include <experimental/coroutine>
|
||||||
|
namespace std {
|
||||||
|
using namespace experimental; // Bring std::experimental into the std namespace
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
# include <coroutine>
|
||||||
# endif
|
# endif
|
||||||
# include <experimental/coroutine>
|
|
||||||
namespace std {
|
|
||||||
using namespace experimental; // Bring std::experimental into the std namespace
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
# if defined __clang__ && defined __GLIBCXX__ && !defined __cpp_impl_coroutine
|
# if defined __clang__ && defined __GLIBCXX__ && !defined __cpp_impl_coroutine
|
||||||
# define __cpp_impl_coroutine 1 // Clang doesn't define this, but it's needed for libstdc++
|
# define __cpp_impl_coroutine 1 // Clang doesn't define this, but it's needed for libstdc++
|
||||||
|
Loading…
Reference in New Issue
Block a user