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
This commit is contained in:
parent
f115acfdc5
commit
35c87bee26
@ -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();
|
||||
|
@ -1,3 +1,3 @@
|
||||
/* $FreeBSD$ */
|
||||
|
||||
#define FREEBSD_CC_VERSION 1200015
|
||||
#define FREEBSD_CC_VERSION 1200016
|
||||
|
Loading…
x
Reference in New Issue
Block a user