[libcxx-commits] [libcxx] [libc++] Don't instantiate __split_buffer with an allocator reference (PR #171651)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 10 11:35:32 PST 2025
ldionne wrote:
Just for awareness, this is the test I am checking in downstream:
```diff
commit 678dff31fc3aa4cca8af265a0205b6392027480d
Author: Louis Dionne <ldionne at apple.com>
Date: Wed Dec 10 14:26:41 2025 -0500
[libc++] Add reproducer for swiftlang/swift#85820
diff --git a/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/foo.h b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/foo.h
new file mode 100644
index 000000000000..58a15627ea18
--- /dev/null
+++ b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/foo.h
@@ -0,0 +1,11 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <vector>
+
+inline std::vector<int> GetOneTwoThree() { return {1, 2, 3}; }
diff --git a/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/main.swift b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/main.swift
new file mode 100644
index 000000000000..b88674cf2c1b
--- /dev/null
+++ b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/main.swift
@@ -0,0 +1,14 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+import Foo
+
+public func testingOneTwoThree() {
+ let v = GetOneTwoThree()
+ print(v.size())
+}
diff --git a/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/module.modulemap b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/module.modulemap
new file mode 100644
index 000000000000..57c5884f0437
--- /dev/null
+++ b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/module.modulemap
@@ -0,0 +1,4 @@
+module Foo {
+ header "foo.h"
+ export *
+}
diff --git a/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/repro.sh.cpp b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/repro.sh.cpp
new file mode 100644
index 000000000000..109655663fd6
--- /dev/null
+++ b/libcxx/test/libcxx/vendor/apple/swift-interop/swiftlang-85820/repro.sh.cpp
@@ -0,0 +1,15 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// This test requires access to the Swift compiler, which we assume is only available on Apple platforms for now.
+// REQUIRES: buildhost=darwin
+
+// Reproducer for https://github.com/swiftlang/swift/issues/85820
+//
+// RUN: swiftc -cxx-interoperability-mode=default -Xcc -nostdinc++ -Xcc -isystem -Xcc "%{include-dir}" \
+// RUN: -Xcc -fmodule-map-file=%S/module.modulemap -Xcc -std=c++20 %S/main.swift
```
I'm not upstreaming that because we don't currently have a policy for officially supporting any interop with other languages, so for now I am building up a downstream suite to track these issues.
https://github.com/llvm/llvm-project/pull/171651
More information about the libcxx-commits
mailing list