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.
13 lines
459 B
Plaintext
13 lines
459 B
Plaintext
// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
|
|
// REQUIRES: objc_codegen
|
|
|
|
// CHECK-LABEL: @"$s30swift_native_objc_runtime_base1CCMm" = hidden global %objc_class {
|
|
// -- metaclass "isa" is root metaclass
|
|
// CHECK: ptr @"OBJC_METACLASS_$_NSObject",
|
|
// -- metaclass "super" is super metaclass
|
|
// CHECK: ptr @"OBJC_METACLASS_$_NSMagicBase"
|
|
@_swift_native_objc_runtime_base(NSMagicBase)
|
|
class C {}
|
|
|
|
sil_vtable C {}
|