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
96 lines
4.0 KiB
C
96 lines
4.0 KiB
C
// RUN: %clang_cc1 -x c %s -triple x86_64-linux-gnu -fclangir -emit-cir -o %t.cir
|
|
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
|
|
// RUN: %clang_cc1 -x c %s -triple x86_64-linux-gnu -fno-builtin -fclangir -emit-cir -o %t.cir
|
|
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
|
|
// RUN: %clang_cc1 -x c++ %s -triple x86_64-linux-gnu -fclangir -emit-cir -o %t.cir
|
|
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
|
|
|
|
// RUN: %clang_cc1 -x c %s -triple x86_64-linux-gnu -fclangir -emit-llvm -o %t-cir.ll
|
|
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
|
|
// RUN: FileCheck --check-prefix=LLVM-DECL --input-file=%t-cir.ll %s
|
|
// RUN: %clang_cc1 -x c %s -triple x86_64-linux-gnu -fno-builtin -fclangir -emit-llvm -o %t-cir.ll
|
|
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
|
|
// RUN: FileCheck --check-prefix=LLVM-DECL --input-file=%t-cir.ll %s
|
|
// RUN: %clang_cc1 -x c++ %s -triple x86_64-linux-gnu -fclangir -emit-llvm -o %t-cir.ll
|
|
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
|
|
// RUN: FileCheck --check-prefix=LLVM-DECL --input-file=%t-cir.ll %s
|
|
|
|
// RUN: %clang_cc1 -x c %s -triple x86_64-linux-gnu -emit-llvm -o %t.ll
|
|
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
|
|
// RUN: FileCheck --check-prefix=LLVM-DECL --input-file=%t.ll %s
|
|
// RUN: %clang_cc1 -x c %s -triple x86_64-linux-gnu -fno-builtin -emit-llvm -o %t.ll
|
|
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
|
|
// RUN: FileCheck --check-prefix=LLVM-DECL --input-file=%t.ll %s
|
|
// RUN: %clang_cc1 -x c++ %s -triple x86_64-linux-gnu -emit-llvm -o %t.ll
|
|
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
|
|
// RUN: FileCheck --check-prefix=LLVM-DECL --input-file=%t.ll %s
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct __jmp_buf_tag { int n; };
|
|
struct __ucontext_t_tag { int n; };
|
|
int setjmp(struct __jmp_buf_tag*);
|
|
int sigsetjmp(struct __jmp_buf_tag*, int);
|
|
int _setjmp(struct __jmp_buf_tag*);
|
|
int __sigsetjmp(struct __jmp_buf_tag*, int);
|
|
int _setjmpex(struct __jmp_buf_tag* env);
|
|
int getcontext(struct __ucontext_t_tag*);
|
|
|
|
typedef struct __jmp_buf_tag jmp_buf[1];
|
|
typedef struct __jmp_buf_tag sigjmp_buf[1];
|
|
typedef struct __ucontext_t_tag ucontext_t[1];
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
// The wildcard in the attributes is to allow this to work with and without -fno-builtin.
|
|
|
|
// CIR: cir.func private @setjmp({{.*}}) -> !s32i attributes {{{.*}}returns_twice}
|
|
// CIR: cir.func private @sigsetjmp({{.*}}) -> !s32i attributes {{{.*}}returns_twice}
|
|
// CIR: cir.func private @_setjmp({{.*}}) -> !s32i attributes {{{.*}}returns_twice}
|
|
// CIR: cir.func private @__sigsetjmp({{.*}}) -> !s32i attributes {{{.*}}returns_twice}
|
|
// CIR: cir.func private @_setjmpex({{.*}}) -> !s32i attributes {{{.*}}returns_twice}
|
|
// CIR: cir.func private @getcontext({{.*}}) -> !s32i attributes {{{.*}}returns_twice}
|
|
|
|
void f(void) {
|
|
jmp_buf jb;
|
|
ucontext_t ut;
|
|
// CIR: cir.call @setjmp(
|
|
// LLVM: call {{.*}} @setjmp(
|
|
setjmp(jb);
|
|
// CIR: cir.call @sigsetjmp(
|
|
// LLVM: call {{.*}} @sigsetjmp(
|
|
sigsetjmp(jb, 0);
|
|
// CIR: cir.call @_setjmp(
|
|
// LLVM: call {{.*}} @_setjmp(
|
|
_setjmp(jb);
|
|
// CIR: cir.call @__sigsetjmp(
|
|
// LLVM: call {{.*}} @__sigsetjmp(
|
|
__sigsetjmp(jb, 0);
|
|
// CIR: cir.call @_setjmpex(
|
|
// LLVM: call {{.*}} @_setjmpex(
|
|
_setjmpex(jb);
|
|
// CIR: cir.call @getcontext(
|
|
// LLVM: call {{.*}} @getcontext(
|
|
getcontext(ut);
|
|
}
|
|
|
|
// These are checked with a separate RUN and check prefix because classic
|
|
// codegen emits them after the definition of @f, while CIR emits them before.
|
|
|
|
// LLVM-DECL: ; Function Attrs: returns_twice
|
|
// LLVM-DECL-NEXT: declare {{.*}} @setjmp(
|
|
// LLVM-DECL: ; Function Attrs: returns_twice
|
|
// LLVM-DECL-NEXT: declare {{.*}} @sigsetjmp(
|
|
// LLVM-DECL: ; Function Attrs: returns_twice
|
|
// LLVM-DECL-NEXT: declare {{.*}} @_setjmp(
|
|
// LLVM-DECL: ; Function Attrs: returns_twice
|
|
// LLVM-DECL-NEXT: declare {{.*}} @__sigsetjmp(
|
|
// LLVM-DECL: ; Function Attrs: returns_twice
|
|
// LLVM-DECL-NEXT: declare {{.*}} @_setjmpex(
|
|
// LLVM-DECL: ; Function Attrs: returns_twice
|
|
// LLVM-DECL-NEXT: declare {{.*}} @getcontext(
|