From ea28e71e864156e6e3f1ddf5e1edf2c283535a23 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sat, 29 Sep 2018 20:01:23 +0000 Subject: clang: allow ifunc resolvers to accept arguments Previously Clang required ifunc resolution functions to take no arguments, presumably because GCC documented ifunc resolvers as taking no arguments. However, GCC accepts resolvers accepting arguments, and our rtld passes CPU ID information (cpuid, hwcap, etc.) to ifunc resolvers. Just remove the check from the in-tree compiler for our in- tree compiler; a different (per-OS) approach may be required upstream. Reported by: mjg Approved by: re (rgrimes) MFC after: 1 week Relnotes: Yes Sponsored by: The FreeBSD Foundation --- contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp index 2172486682cf..226dc193aed4 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp @@ -321,8 +321,6 @@ void CodeGenModule::checkAliases() { assert(FTy); if (!FTy->getReturnType()->isPointerTy()) Diags.Report(Location, diag::err_ifunc_resolver_return); - if (FTy->getNumParams()) - Diags.Report(Location, diag::err_ifunc_resolver_params); } llvm::Constant *Aliasee = Alias->getIndirectSymbol(); -- cgit v1.2.3