1 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
3 declare i8* @llvm.frameallocate(i32)
4 declare i8* @llvm.framerecover(i8*, i8*)
6 define internal void @f() {
7 call i8* @llvm.frameallocate(i32 4)
8 call i8* @llvm.frameallocate(i32 4)
11 ; CHECK: multiple calls to llvm.frameallocate in one function
13 define internal void @f_a(i32 %n) {
14 call i8* @llvm.frameallocate(i32 %n)
17 ; CHECK: llvm.frameallocate argument must be constant integer size
19 define internal void @g() {
23 call i8* @llvm.frameallocate(i32 4)
26 ; CHECK: llvm.frameallocate used outside of entry block
28 define internal void @h() {
29 call i8* @llvm.framerecover(i8* null, i8* null)
32 ; CHECK: llvm.framerecover first argument must be function defined in this module
34 @global = constant i8 0
36 declare void @declaration()
38 define internal void @i() {
39 call i8* @llvm.framerecover(i8* @global, i8* null)
42 ; CHECK: llvm.framerecover first argument must be function defined in this module
44 define internal void @j() {
45 call i8* @llvm.framerecover(i8* bitcast(void()* @declaration to i8*), i8* null)
48 ; CHECK: llvm.framerecover first argument must be function defined in this module