brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · abdd73d Raw
42 lines · plain
1; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s2 3define void @test_too_few_arguments(i32 %arg, ...) "modular-format"="printf,1,2,basic_mod" {4  ret void5}6; CHECK: modular-format attribute requires at least 5 arguments7; CHECK-NEXT: ptr @test_too_few_arguments8 9define void @test_first_arg_index_not_integer(i32 %arg, ...) "modular-format"="printf,1,foo,basic_mod,basic_impl" {10  ret void11}12; CHECK: modular-format attribute first arg index is not an integer13; CHECK-NEXT: ptr @test_first_arg_index_not_integer14 15define void @test_first_arg_index_zero(i32 %arg) "modular-format"="printf,1,0,basic_mod,basic_impl" {16  ret void17}18; CHECK: modular-format attribute first arg index is out of bounds19; CHECK-NEXT: ptr @test_first_arg_index_zero20 21define void @test_first_arg_index_out_of_bounds(i32 %arg) "modular-format"="printf,1,2,basic_mod,basic_impl" {22  ret void23}24; CHECK: modular-format attribute first arg index is out of bounds25; CHECK-NEXT: ptr @test_first_arg_index_out_of_bounds26 27define void @test_first_arg_index_out_of_bounds_varargs(i32 %arg, ...) "modular-format"="printf,1,3,basic_mod,basic_impl" {28  ret void29}30; CHECK: modular-format attribute first arg index is out of bounds31; CHECK-NEXT: ptr @test_first_arg_index_out_of_bounds_varargs32 33; CHECK-NOT: ptr @test_first_arg_index_in_bounds34define void @test_first_arg_index_in_bounds(i32 %arg) "modular-format"="printf,1,1,basic_mod,basic_impl" {35  ret void36}37 38; CHECK-NOT: ptr @test_first_arg_index_in_bounds_varargs39define void @test_first_arg_index_in_bounds_varargs(i32 %arg, ...) "modular-format"="printf,1,2,basic_mod,basic_impl" {40  ret void41}42