mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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.
11 lines
572 B
Swift
11 lines
572 B
Swift
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -enable-objc-interop -primary-file %s %S/Inputs/objc_protocol_multi_file_helper.swift -g -emit-ir | %FileCheck %s
|
|
// REQUIRES: objc_codegen
|
|
|
|
// This used to crash <rdar://problem/17929944>.
|
|
// To tickle the crash, SubProto must not be used elsewhere in this file.
|
|
protocol SubProto : BaseProto {}
|
|
// CHECK: @"$s24objc_protocol_multi_file8SubProtoMp" = hidden constant
|
|
|
|
protocol DoubleSubProto : IntermediateProto {}
|
|
// CHECK: @"$s24objc_protocol_multi_file14DoubleSubProtoMp" = hidden constant
|