Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: test/NaCl/PNaClABI/abi-small-arguments.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/NaCl/PNaClABI/abi-metadata.ll ('k') | test/NaCl/PNaClABI/abi-stripped-pointers.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; RUN: not pnacl-abicheck < %s | FileCheck %s
2
3 define void @arg_i1(i1 %bad) {
4 ret void
5 }
6 ; CHECK: Function arg_i1 has disallowed type:
7
8 define void @arg_i16(i32 %allowed, i16 %bad) {
9 ret void
10 }
11 ; CHECK: Function arg_i16 has disallowed type:
12
13 define i1 @return_i1() {
14 ret i1 0
15 }
16 ; CHECK: Function return_i1 has disallowed type:
17
18 define i8 @return_i8() {
19 ret i8 0
20 }
21 ; CHECK: Function return_i8 has disallowed type:
22
23
24 define void @bad_direct_calls() {
25 call void @arg_i1(i1 0)
26 ; CHECK: bad function callee operand: call void @arg_i1
27
28 call void @arg_i16(i32 0, i16 0)
29 ; CHECK-NEXT: bad function callee operand: call void @arg_i16
30
31 %result1 = call i1 @return_i1()
32 ; CHECK-NEXT: bad function callee operand: {{.*}} call i1 @return_i1
33
34 %result2 = call i8 @return_i8()
35 ; CHECK-NEXT: bad function callee operand: {{.*}} call i8 @return_i8
36
37 ret void
38 }
39
40 define void @bad_indirect_calls(i32 %ptr) {
41 %func1 = inttoptr i32 %ptr to void (i8)*
42 ; CHECK: bad result type: void (i8)* %func1
43 call void %func1(i8 0)
44 ; CHECK: bad function callee operand: {{.*}} %func1
45
46 %func2 = inttoptr i32 %ptr to i16 ()*
47 ; CHECK: bad result type: i16 ()* %func2
48 %result3 = call i16 %func2()
49 ; CHECK: bad function callee operand: {{.*}} %func2
50
51 ret void
52 }
OLDNEW
« no previous file with comments | « test/NaCl/PNaClABI/abi-metadata.ll ('k') | test/NaCl/PNaClABI/abi-stripped-pointers.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698