Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

43 lines
2.3 KiB
C

// RUN: %clang_cc1 %s -std=c11 -triple=x86_64-pc-linux -fvisibility=hidden -fapply-global-visibility-to-externs -emit-llvm -o - | FileCheck --check-prefix=CHECK-HIDDEN %s
// RUN: %clang_cc1 %s -std=c11 -triple=x86_64-pc-linux -fvisibility=protected -fapply-global-visibility-to-externs -emit-llvm -o - | FileCheck --check-prefix=CHECK-PROTECTED %s
// RUN: %clang_cc1 %s -std=c11 -triple=x86_64-pc-linux -fvisibility=default -fapply-global-visibility-to-externs -emit-llvm -o - | FileCheck --check-prefix=CHECK-DEFAULT %s
// CHECK-HIDDEN: @var_hidden = external hidden global
// CHECK-PROTECTED: @var_hidden = external hidden global
// CHECK-DEFAULT: @var_hidden = external hidden global
__attribute__((visibility("hidden"))) extern int var_hidden;
// CHECK-HIDDEN: @var_protected = external protected global
// CHECK-PROTECTED: @var_protected = external protected global
// CHECK-DEFAULT: @var_protected = external protected global
__attribute__((visibility("protected"))) extern int var_protected;
// CHECK-HIDDEN: @var_default = external global
// CHECK-PROTECTED: @var_default = external global
// CHECK-DEFAULT: @var_default = external global
__attribute__((visibility("default"))) extern int var_default;
// CHECK-HIDDEN: @var = external hidden global
// CHECK-PROTECTED: @var = external protected global
// CHECK-DEFAULT: @var = external global
extern int var;
// CHECK-HIDDEN: declare hidden i32 @func_hidden()
// CHECK-PROTECTED: declare hidden i32 @func_hidden()
// CHECK-DEFAULT: declare hidden i32 @func_hidden()
__attribute__((visibility("hidden"))) int func_hidden(void);
// CHECK-HIDDEN: declare protected i32 @func_protected()
// CHECK-PROTECTED: declare protected i32 @func_protected()
// CHECK-DEFAULT: declare protected i32 @func_protected()
__attribute__((visibility("protected"))) int func_protected(void);
// CHECK-HIDDEN: declare i32 @func_default()
// CHECK-PROTECTED: declare i32 @func_default()
// CHECK-DEFAULT: declare i32 @func_default()
__attribute__((visibility("default"))) int func_default(void);
// CHECK-HIDDEN: declare hidden i32 @func()
// CHECK-PROTECTED: declare protected i32 @func()
// CHECK-DEFAULT: declare i32 @func()
int func(void);
int use(void) {
return var_hidden + var_protected + var_default + var +
func_hidden() + func_protected() + func_default() + func();
}