diff options
| author | Jo Bates <29763794+jbatez@users.noreply.github.com> | 2025-06-04 19:49:13 -0700 |
|---|---|---|
| committer | Jo Bates <29763794+jbatez@users.noreply.github.com> | 2025-09-13 16:06:22 -0700 |
| commit | 1ebf69d1b1a94e99c01680514571c41d0b864c15 (patch) | |
| tree | e2676d6c42b09f85f30f57f8447f0f862d1daa33 /tests/codegen-llvm/auxiliary/darwin_objc_aux.rs | |
| parent | 02c7b1a7ac1d739663878030510508372e46f254 (diff) | |
| download | rust-1ebf69d1b1a94e99c01680514571c41d0b864c15.tar.gz rust-1ebf69d1b1a94e99c01680514571c41d0b864c15.zip | |
initial implementation of the darwin_objc unstable feature
Diffstat (limited to 'tests/codegen-llvm/auxiliary/darwin_objc_aux.rs')
| -rw-r--r-- | tests/codegen-llvm/auxiliary/darwin_objc_aux.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/codegen-llvm/auxiliary/darwin_objc_aux.rs b/tests/codegen-llvm/auxiliary/darwin_objc_aux.rs new file mode 100644 index 00000000000..3c35d003c8a --- /dev/null +++ b/tests/codegen-llvm/auxiliary/darwin_objc_aux.rs @@ -0,0 +1,27 @@ +#![crate_type = "lib"] +#![feature(darwin_objc)] + +use std::os::darwin::objc; + +#[link(name = "Foundation", kind = "framework")] +unsafe extern "C" {} + +#[inline(always)] +pub fn inline_get_object_class() -> objc::Class { + objc::class!("NSObject") +} + +#[inline(always)] +pub fn inline_get_alloc_selector() -> objc::SEL { + objc::selector!("alloc") +} + +#[inline(never)] +pub fn never_inline_get_string_class() -> objc::Class { + objc::class!("NSString") +} + +#[inline(never)] +pub fn never_inline_get_init_selector() -> objc::SEL { + objc::selector!("init") +} |
