mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Clang does not accept `-x objective-c` with WebAssembly target and it crashes with "Objective-C support is unimplemented for object file format" for now. `-enable-objc-interop` can work without the objc runtime support (which is indicated by `objc_interop` feature), so this adds a new `objc_codegen` feature to require Objective-C support only at compile-time.
15 lines
487 B
Swift
15 lines
487 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_bridged_generic_conformance.h | %FileCheck %s
|
|
// REQUIRES: objc_codegen
|
|
|
|
// CHECK-NOT: _TMnCSo
|
|
|
|
// CHECK: @"$sSo6ThingyCyxG32objc_bridged_generic_conformance1PADMc" = hidden constant %swift.protocol_conformance_descriptor {{.*}} @.str.6.Thingy
|
|
|
|
// CHECK-NOT: _TMnCSo
|
|
|
|
protocol P { func test() }
|
|
|
|
extension Thingy: P {
|
|
@objc func test() {}
|
|
}
|