aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/SystemZ/builtin-setjmp-logjmp.c
blob: 898891fa182ea4b94e702ae3f4ddfd3a72f8e288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
// RUN: %clang_cc1 -triple s390x-linux -emit-llvm -o - %s | FileCheck %s

void *buf[20];

// CHECK-LABEL: define dso_local void @foo(
// CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
// CHECK-NEXT:  [[ENTRY:.*:]]
// CHECK-NEXT:    [[TMP0:%.*]] = call i32 @llvm.eh.sjlj.setjmp(ptr @buf)
// CHECK-NEXT:    ret void
//
void foo()
{
  __builtin_setjmp (buf);
}

// CHECK-LABEL: define dso_local void @foo1(
// CHECK-SAME: ) #[[ATTR0]] {
// CHECK-NEXT:  [[ENTRY:.*:]]
// CHECK-NEXT:    call void @llvm.eh.sjlj.longjmp(ptr @buf)
// CHECK-NEXT:    unreachable
//
void foo1()
{
  __builtin_longjmp (buf, 1);
}