Files
clang-p2996/llvm/test/Assembler/ifunc-asm.ll
Itay Bookstein 848812a55e [Verifier] Add verification logic for GlobalIFuncs
Verify that the resolver exists, that it is a defined
Function, and that its return type matches the ifunc's
type. Add corresponding check to BitcodeReader, change
clang to emit the correct type, and fix tests to comply.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D112349
2021-10-31 20:00:57 -07:00

22 lines
682 B
LLVM

; RUN: llvm-as < %s | llvm-dis | FileCheck %s
target triple = "x86_64-unknown-linux-gnu"
@foo = ifunc i32 (i32), i32 (i32)* ()* @foo_ifunc
; CHECK: @foo = ifunc i32 (i32), i32 (i32)* ()* @foo_ifunc
@strlen = ifunc i64 (i8*), bitcast (i64 (i32*)* ()* @mistyped_strlen_resolver to i64 (i8*)* ()*)
; CHECK: strlen = ifunc i64 (i8*), bitcast (i64 (i32*)* ()* @mistyped_strlen_resolver to i64 (i8*)* ()*)
define internal i32 (i32)* @foo_ifunc() {
entry:
ret i32 (i32)* null
}
; CHECK: define internal i32 (i32)* @foo_ifunc()
define internal i64 (i32*)* @mistyped_strlen_resolver() {
entry:
ret i64 (i32*)* null
}
; CHECK: define internal i64 (i32*)* @mistyped_strlen_resolver()