CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
98 lines
3.0 KiB
Objective-C
98 lines
3.0 KiB
Objective-C
// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - -DTEST_ATTR | FileCheck %s --check-prefixes=OBJC,OBJC-ATTR
|
|
// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - -mno-outline | FileCheck %s --check-prefixes=OBJC,OBJC-ARG
|
|
// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s --check-prefixes=OBJC,OBJC-NONE
|
|
|
|
// RUN: %clang_cc1 -emit-llvm -x objective-c++ %s -triple x86_64-unknown-linux-gnu -o - -DTEST_ATTR | FileCheck %s --check-prefixes=OBJCXX,OBJCXX-ATTR
|
|
// RUN: %clang_cc1 -emit-llvm -x objective-c++ %s -triple x86_64-unknown-linux-gnu -o - -mno-outline | FileCheck %s --check-prefixes=OBJCXX,OBJCXX-ARG
|
|
// RUN: %clang_cc1 -emit-llvm -x objective-c++ %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s --check-prefixes=OBJCXX,OBJCXX-NONE
|
|
|
|
// This test checks that:
|
|
// - [[clang::no_outline]] adds the nooutline IR attribute to specific definitions
|
|
// - `-mno-outline` adds the nooutline IR attribute to all definitions
|
|
// - Lack of either does not add nooutline IR attribute
|
|
|
|
|
|
#ifdef TEST_ATTR
|
|
#define ATTR [[clang::no_outline]]
|
|
#else
|
|
#define ATTR
|
|
#endif
|
|
|
|
@interface Test
|
|
- (int)method:(int)x;
|
|
- (int)method_no_attr:(int)x;
|
|
+ (int)static_method:(int)x;
|
|
+ (int)static_method_no_attr:(int)x;
|
|
@end
|
|
|
|
@implementation Test
|
|
|
|
// OBJC-LABEL: define internal i32 @"\01-[Test method:]"(
|
|
// OBJC: ) #[[ATTR0:[0-9]+]] {
|
|
|
|
// OBJCXX-LABEL: define internal noundef i32 @"\01-[Test method:]"(
|
|
// OBJCXX: ) #[[ATTR0:[0-9]+]] {
|
|
- (int)method:(int)x ATTR {
|
|
return x;
|
|
}
|
|
|
|
// OBJC-LABEL: define internal i32 @"\01-[Test method_no_attr:]"(
|
|
// OBJC-ATTR: ) #[[ATTR1:[0-9]+]] {
|
|
// OBJC-ARG: ) #[[ATTR0]] {
|
|
// OBJC-NONE: ) #[[ATTR0]] {
|
|
|
|
// OBJCXX-LABEL: define internal noundef i32 @"\01-[Test method_no_attr:]"(
|
|
// OBJCXX-ATTR: ) #[[ATTR1:[0-9]+]] {
|
|
// OBJCXX-ARG: ) #[[ATTR0]] {
|
|
// OBJCXX-NONE: ) #[[ATTR0]] {
|
|
- (int)method_no_attr:(int) x {
|
|
return x;
|
|
}
|
|
|
|
// OBJC-LABEL: define internal i32 @"\01+[Test static_method:]"(
|
|
// OBJC: ) #[[ATTR0]] {
|
|
|
|
// OBJCXX-LABEL: define internal noundef i32 @"\01+[Test static_method:]"(
|
|
// OBJCXX: ) #[[ATTR0]] {
|
|
+ (int)static_method:(int)x ATTR {
|
|
return x;
|
|
}
|
|
|
|
|
|
// OBJC-LABEL: define internal i32 @"\01+[Test static_method_no_attr:]"(
|
|
// OBJC-ATTR: ) #[[ATTR1]] {
|
|
// OBJC-ARG: ) #[[ATTR0]] {
|
|
// OBJC-NONE: ) #[[ATTR0]] {
|
|
|
|
|
|
// OBJCXX-LABEL: define internal noundef i32 @"\01+[Test static_method_no_attr:]"(
|
|
// OBJCXX-ATTR: ) #[[ATTR1]] {
|
|
// OBJCXX-ARG: ) #[[ATTR0]] {
|
|
// OBJCXX-NONE: ) #[[ATTR0]] {
|
|
|
|
+ (int)static_method_no_attr:(int)x {
|
|
return x;
|
|
}
|
|
|
|
@end
|
|
|
|
// OBJC: attributes #[[ATTR0]] = {
|
|
// OBJC-ATTR-SAME: nooutline
|
|
// OBJC-ARG-SAME: nooutline
|
|
// OBJC-NONE-NOT: nooutline
|
|
// OBJC-SAME: }
|
|
|
|
// OBJC-ATTR: attributes #[[ATTR1]] = {
|
|
// OBJC-ATTR-NOT: nooutline
|
|
// OBJC-ATTR-SAME: }
|
|
|
|
// OBJCXX: attributes #[[ATTR0]] = {
|
|
// OBJCXX-ATTR-SAME: nooutline
|
|
// OBJCXX-ARG-SAME: nooutline
|
|
// OBJCXX-NONE-NOT: nooutline
|
|
// OBJCXX-SAME: }
|
|
|
|
// OBJCXX-ATTR: attributes #[[ATTR1]] = {
|
|
// OBJCXX-ATTR-NOT: nooutline
|
|
// OBJCXX-ATTR-SAME: }
|