Files
swift-mirror/test/Interop/Cxx/class/pimpl-module-interface.swift
Egor Zhdan 738c8fb6c6 [cxx-interop] Skip type metadata for C++ types that are only used in private C++ fields
This fixes compiler errors for C++ types that use pimpl idiom:
```
invalid application of 'sizeof' to an incomplete type
```

rdar://141960396
2025-01-13 12:03:35 +00:00

15 lines
577 B
Swift

// RUN: %target-swift-ide-test -print-module -module-to-print=PIMPL -print-access -I %S/Inputs -cxx-interoperability-mode=default -source-filename=x | %FileCheck %s
// FIXME: We can't import std::unique_ptr properly on Windows (https://github.com/apple/swift/issues/70226)
// XFAIL: OS=windows-msvc
// CHECK: public struct HasPIMPL {
// CHECK-NEXT: public init()
// CHECK-NEXT: private var ptr: OpaquePointer!
// CHECK-NEXT: }
// CHECK: public struct HasSmartPIMPL {
// CHECK-NEXT: public init()
// CHECK-NEXT: private var smart_ptr: std.
// CHECK-NEXT: }