[Verifier] Restore defined-resolver verification for IFuncs
authorItay Bookstein <ibookstein@gmail.com>
Sat, 29 Jan 2022 12:33:18 +0000 (14:33 +0200)
committerItay Bookstein <ibookstein@gmail.com>
Sat, 26 Feb 2022 10:56:14 +0000 (12:56 +0200)
commit7ca7d8126d4e47b48dbeb1bd3efd462c5bd889b1
tree74c33fdf072e1ad19a904cd572bb2db28d550b73
parent730acdc4454ca581211f447f07579cdaf79e2558
[Verifier] Restore defined-resolver verification for IFuncs

Now that clang no longer emits GlobalIFunc-s with a
declaration for a resolver, we can restore that check.
In addition, add a linkage check like the one we have
on GlobalAlias-es, and a Verifier test for ifuncs.

Signed-off-by: Itay Bookstein <ibookstein@gmail.com>
Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D120267
llvm/include/llvm/IR/GlobalIFunc.h
llvm/lib/IR/Verifier.cpp
llvm/test/Verifier/ifunc.ll [new file with mode: 0644]