llvm-project
d4570181 - [lldb][test] Remove libc++ dependency in common libcxx-simulators header (#190922)

Commit
200 days ago
[lldb][test] Remove libc++ dependency in common libcxx-simulators header (#190922) After we made the test-suite mostly compile against system libc++ (in https://github.com/llvm/llvm-project/pull/190034), the `invalid-vector` test started failing on the macOS bots with: ``` /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include/c++/v1 -std=c++20 --driver-mode=g++ -MT main.o -MD -MP -MF main.d -c -o main.o /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp [2026-04-07T00:09:44.764Z] /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/invalid-vector/main.cpp:6:1: error: too few template parameters in template redeclaration [2026-04-07T00:09:44.764Z] 6 | template <typename T> struct vector { [2026-04-07T00:09:44.764Z] | ^~~~~~~~~~~~~~~~~~~~~ [2026-04-07T00:09:44.764Z] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include/c++/v1/iosfwd:167:1: note: previous template declaration is here [2026-04-07T00:09:44.764Z] 167 | template <class _Tp, class _Alloc = allocator<_Tp> > [2026-04-07T00:09:44.764Z] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` This patch fixes the error by removing the STL header includes from the `compressed_pair.h` header. Presumably the `vector` forward declaration somehow gets pulled in via one of those headers (via `iosfwd`). The `libcxx-simulators` tests are supposed to be STL-independent, so removing this dependency works towards that goal.
Author
Parents
Loading