|
| 1 | +// Test that we don't generate Objective-C definitions or image info unnecessarily. |
| 2 | + |
| 3 | +//@ add-core-stubs |
| 4 | +//@ revisions: i686_apple_darwin |
| 5 | +//@ [i686_apple_darwin] compile-flags: --target i686-apple-darwin |
| 6 | +//@ [i686_apple_darwin] needs-llvm-components: x86 |
| 7 | +//@ revisions: x86_64_macos |
| 8 | +//@ [x86_64_macos] compile-flags: --target x86_64-apple-darwin |
| 9 | +//@ [x86_64_macos] needs-llvm-components: x86 |
| 10 | +//@ revisions: aarch64_macos |
| 11 | +//@ [aarch64_macos] compile-flags: --target aarch64-apple-darwin |
| 12 | +//@ [aarch64_macos] needs-llvm-components: aarch64 |
| 13 | +//@ revisions: i386_ios |
| 14 | +//@ [i386_ios] compile-flags: --target i386-apple-ios |
| 15 | +//@ [i386_ios] needs-llvm-components: x86 |
| 16 | +//@ revisions: x86_64_ios |
| 17 | +//@ [x86_64_ios] compile-flags: --target x86_64-apple-ios |
| 18 | +//@ [x86_64_ios] needs-llvm-components: x86 |
| 19 | +//@ revisions: armv7s_ios |
| 20 | +//@ [armv7s_ios] compile-flags: --target armv7s-apple-ios |
| 21 | +//@ [armv7s_ios] needs-llvm-components: arm |
| 22 | +//@ revisions: aarch64_ios |
| 23 | +//@ [aarch64_ios] compile-flags: --target aarch64-apple-ios |
| 24 | +//@ [aarch64_ios] needs-llvm-components: aarch64 |
| 25 | +//@ revisions: aarch64_ios_sim |
| 26 | +//@ [aarch64_ios_sim] compile-flags: --target aarch64-apple-ios-sim |
| 27 | +//@ [aarch64_ios_sim] needs-llvm-components: aarch64 |
| 28 | + |
| 29 | +#![crate_type = "lib"] |
| 30 | +#![feature(no_core, lang_items)] |
| 31 | +#![no_core] |
| 32 | + |
| 33 | +extern crate minicore; |
| 34 | +use minicore::*; |
| 35 | + |
| 36 | +#[no_mangle] |
| 37 | +pub fn foo() {} |
| 38 | + |
| 39 | +// CHECK-NOT: %struct._class_t |
| 40 | +// CHECK-NOT: %struct._objc_module |
| 41 | +// CHECK-NOT: @OBJC_CLASS_NAME_ |
| 42 | +// CHECK-NOT: @"OBJC_CLASS_$_{{[0-9A-Z_a-z]+}}" |
| 43 | +// CHECK-NOT: @"OBJC_CLASSLIST_REFERENCES_$_.{{[0-9]+}}" |
| 44 | +// CHECK-NOT: @OBJC_METH_VAR_NAME_ |
| 45 | +// CHECK-NOT: @OBJC_SELECTOR_REFERENCES_ |
| 46 | +// CHECK-NOT: @OBJC_MODULES |
| 47 | + |
| 48 | +// CHECK-NOT: !"Objective-C Version" |
| 49 | +// CHECK-NOT: !"Objective-C Image Info Version" |
| 50 | +// CHECK-NOT: !"Objective-C Image Info Section" |
| 51 | +// CHECK-NOT: !"Objective-C Is Simulated" |
| 52 | +// CHECK-NOT: !"Objective-C Class Properties" |
0 commit comments