1 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
3 define ptr @resolver() {
7 @inval_linkage = extern_weak ifunc void (), ptr @resolver
8 ; CHECK: IFunc should have {{.*}} linkage!
9 ; CHECK-NEXT: @inval_linkage
11 @g = external global i32
12 @inval_objtype = ifunc void (), ptr @g
13 ; CHECK: IFunc must have a Function resolver
15 declare ptr @resolver_decl()
16 @inval_resolver_decl = ifunc void (), ptr @resolver_decl
17 ; CHECK: IFunc resolver must be a definition
18 ; CHECK-NEXT: @inval_resolver_decl
20 define available_externally ptr @resolver_linker_decl() {
23 @inval_resolver_decl2 = ifunc void (), ptr @resolver_linker_decl
24 ; CHECK: IFunc resolver must be a definition
25 ; CHECK-NEXT: @inval_resolver_decl2
27 @ifunc_nonpointer_return_type = ifunc i32 (), ptr @resolver_returns_nonpointer
28 ; CHECK: IFunc resolver must return a pointer
29 ; CHECK-NEXT: ptr @ifunc_nonpointer_return_type
31 define i32 @resolver_returns_nonpointer() {