ManagedBuffer capacity is unavailable on OpenBSD.

On OpenBSD, malloc introspection (e.g., malloc_usable_size or
malloc_size) is not provided by the platform allocator. Since allocator
introspection is currently a load-bearing piece of functionality for
ManagedBuffer and ManagedBufferPointer, pending any API changes, as a
stopgap measure, this commit marks methods in ManagedBuffer and
ManagedBufferPointer calling _swift_stdlib_malloc_size and methods
dependent thereon unavailable on OpenBSD.

This may induce some compatibility issues for some files, but at least
this change ensures that we can get stdlib to build on this platform
until the evolution process addresses this problem more thoroughly.
This commit is contained in:
3405691582
2020-08-21 18:33:19 -04:00
parent b59910ef5b
commit cd7570fdee
4 changed files with 7 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
// RUN: %target-run-simple-swift
// REQUIRES: executable_test
// XFAIL: OS=openbsd
import StdlibUnittest