Files
swift-mirror/test/Interop/Cxx/stdlib/Inputs/check-libcxx-version.cpp
Henrik G. Olsson 0276febf41 handle libc++ v17-19
libc++ v17-19 was split into multiple top-level modules, while versions
earlier and later had one TLM with submodules.
2025-09-16 21:10:09 -07:00

17 lines
363 B
C++

#include <iostream>
int main() {
#if !defined(_LIBCPP_VERSION)
std::cout << "no libc++ found\n";
return 1;
#endif
// the libc++ module was split into multiple top-level modules in Clang 17,
// and then re-merged into one module with submodules in Clang 20
#if _LIBCPP_VERSION >= 170004 && _LIBCPP_VERSION < 200000
return 0;
#else
return 1;
#endif
}