mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This fixes compiler errors for C++ types that use pimpl idiom: ``` invalid application of 'sizeof' to an incomplete type ``` rdar://141960396
16 lines
461 B
Swift
16 lines
461 B
Swift
// RUN: %target-swiftxx-frontend -emit-irgen %s -I %S/Inputs | %FileCheck %s
|
|
|
|
// Make sure Swift handles the C++ pointer-to-implementation idiom properly.
|
|
|
|
import PIMPL
|
|
|
|
// Trigger type metadata to be emitted by conforming C++ types to a Swift protocol.
|
|
protocol MyProto {}
|
|
extension HasPIMPL : MyProto {}
|
|
extension HasSmartPIMPL : MyProto {}
|
|
|
|
let _ = createHasPIMPL()
|
|
let _ = createHasSmartPIMPL()
|
|
|
|
// CHECK-NOT: @"get_type_metadata {{.*}}default_delete{{.*}}
|