aboutsummaryrefslogtreecommitdiff
path: root/test/NaCl/PNaClABI/abi-small-arguments.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/NaCl/PNaClABI/abi-small-arguments.ll')
-rw-r--r--test/NaCl/PNaClABI/abi-small-arguments.ll17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/NaCl/PNaClABI/abi-small-arguments.ll b/test/NaCl/PNaClABI/abi-small-arguments.ll
index 890b84c42a..ce698e7d47 100644
--- a/test/NaCl/PNaClABI/abi-small-arguments.ll
+++ b/test/NaCl/PNaClABI/abi-small-arguments.ll
@@ -21,25 +21,32 @@ define i8 @return_i8() {
; CHECK: Function return_i8 has disallowed type:
-; Direct calls currently do not produce errors because the functions
-; are deemed to have already been flagged.
-; CHECK-NOT: disallowed
define void @bad_direct_calls() {
call void @arg_i1(i1 0)
+; CHECK: bad function callee operand: call void @arg_i1
+
call void @arg_i16(i32 0, i16 0)
+; CHECK-NEXT: bad function callee operand: call void @arg_i16
+
%result1 = call i1 @return_i1()
+; CHECK-NEXT: bad function callee operand: {{.*}} call i1 @return_i1
+
%result2 = call i8 @return_i8()
+; CHECK-NEXT: bad function callee operand: {{.*}} call i8 @return_i8
+
ret void
}
define void @bad_indirect_calls(i32 %ptr) {
%func1 = inttoptr i32 %ptr to void (i8)*
+; CHECK: bad result type: %func1
call void %func1(i8 0)
-; CHECK: Function bad_indirect_calls has instruction with disallowed type: void (i8)*
+; CHECK: bad function callee operand: {{.*}} %func1
%func2 = inttoptr i32 %ptr to i16 ()*
+; CHECK: bad result type: %func2
%result3 = call i16 %func2()
-; CHECK: Function bad_indirect_calls has instruction with disallowed type: i16 ()*
+; CHECK: bad function callee operand: {{.*}} %func2
ret void
}