annotate clang/test/CodeGen/call.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang %s -O0 -emit-llvm -S -o - | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // This should call rb_define_global_function, not rb_f_chop.
anatofuz
parents:
diff changeset
4 void rb_define_global_function (const char*,void(*)(),int);
anatofuz
parents:
diff changeset
5 static void rb_f_chop();
anatofuz
parents:
diff changeset
6 void Init_String() {
anatofuz
parents:
diff changeset
7 rb_define_global_function("chop", rb_f_chop, 0);
anatofuz
parents:
diff changeset
8 }
anatofuz
parents:
diff changeset
9 static void rb_f_chop() {
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, ...);
anatofuz
parents:
diff changeset
18 void Interpret() {
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); };
anatofuz
parents:
diff changeset
29 typedef int SigHandler ();
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
anatofuz
parents:
diff changeset
36 void rl_set_signals() {
anatofuz
parents:
diff changeset
37 SigHandler *oh;
anatofuz
parents:
diff changeset
38 oh = rl_set_sighandler(0);
anatofuz
parents:
diff changeset
39 }