annotate clang/test/CodeGen/mrtd.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_cc1 -mrtd -triple i386-unknown-unknown -std=c89 -emit-llvm -o - %s 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // CHECK: mrtd.c:10:3: warning: function with no prototype cannot use the stdcall calling convention
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 void baz(int arg);
anatofuz
parents:
diff changeset
6
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 // CHECK: define{{.*}} x86_stdcallcc void @foo(i32 %arg) [[NUW:#[0-9]+]]
150
anatofuz
parents:
diff changeset
8 void foo(int arg) {
anatofuz
parents:
diff changeset
9 // CHECK: call x86_stdcallcc i32 bitcast (i32 (...)* @bar to i32 (i32)*)(
anatofuz
parents:
diff changeset
10 bar(arg);
anatofuz
parents:
diff changeset
11 // CHECK: call x86_stdcallcc void @baz(i32
anatofuz
parents:
diff changeset
12 baz(arg);
anatofuz
parents:
diff changeset
13 }
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 // CHECK: declare x86_stdcallcc i32 @bar(...)
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 // CHECK: declare x86_stdcallcc void @baz(i32)
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 void qux(int arg, ...) { }
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
20 // CHECK: define{{.*}} void @qux(i32 %arg, ...)
150
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 void quux(int a1, int a2, int a3) {
anatofuz
parents:
diff changeset
23 qux(a1, a2, a3);
anatofuz
parents:
diff changeset
24 }
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
25 // CHECK-LABEL: define{{.*}} x86_stdcallcc void @quux
150
anatofuz
parents:
diff changeset
26 // CHECK: call void (i32, ...) @qux
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 // CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }