annotate clang/test/CodeGen/call.c @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents c4bab56944e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
1 // RUN: %clang %s -O0 -Wno-strict-prototypes -emit-llvm -S -o - | FileCheck %s
150
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // This should call rb_define_global_function, not rb_f_chop.
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
4 void rb_define_global_function (const char*,void(*)(void),int);
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
5 static void rb_f_chop(void);
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
6 void Init_String(void) {
150
anatofuz
parents:
diff changeset
7 rb_define_global_function("chop", rb_f_chop, 0);
anatofuz
parents:
diff changeset
8 }
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
9 static void rb_f_chop(void) {
150
anatofuz
parents:
diff changeset
10 }
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 // CHECK: call{{.*}}rb_define_global_function
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 // PR10335
anatofuz
parents:
diff changeset
15 typedef void (* JSErrorCallback)(void);
anatofuz
parents:
diff changeset
16 void js_GetErrorMessage(void);
anatofuz
parents:
diff changeset
17 void JS_ReportErrorNumber(JSErrorCallback errorCallback, ...);
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
18 void Interpret(void) {
150
anatofuz
parents:
diff changeset
19 JS_ReportErrorNumber(js_GetErrorMessage, 0);
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 // CHECK: call {{.*}}void ({{.*}}, ...) @JS_ReportErrorNumber({{.*}}@js_GetErrorMessage
anatofuz
parents:
diff changeset
22 }
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 // PR10337
anatofuz
parents:
diff changeset
28 struct sigaction { int (*_sa_handler)(int); };
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
29 typedef int SigHandler (void);
150
anatofuz
parents:
diff changeset
30 typedef struct sigaction sighandler_cxt;
anatofuz
parents:
diff changeset
31 SigHandler *rl_set_sighandler(ohandler)
anatofuz
parents:
diff changeset
32 sighandler_cxt *ohandler; {
anatofuz
parents:
diff changeset
33 return 0;
anatofuz
parents:
diff changeset
34 }
anatofuz
parents:
diff changeset
35
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
36 void rl_set_signals(void) {
150
anatofuz
parents:
diff changeset
37 SigHandler *oh;
anatofuz
parents:
diff changeset
38 oh = rl_set_sighandler(0);
anatofuz
parents:
diff changeset
39 }