diff options
author | Ed Maste <emaste@freebsd.org> | 2018-10-10 00:34:17 +0000 |
---|---|---|
committer | Ed Maste <emaste@freebsd.org> | 2018-10-10 00:34:17 +0000 |
commit | 8bddfdd59ce2e76d0c99785a3838d4b28fd556b3 (patch) | |
tree | d601abc8cad5d17d2dcdc0474f8dd7b315cbfc2b /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 2043a58abeacda130b01fba8f53aacc0915e6b25 (diff) | |
download | bcm5719-llvm-8bddfdd59ce2e76d0c99785a3838d4b28fd556b3.tar.gz bcm5719-llvm-8bddfdd59ce2e76d0c99785a3838d4b28fd556b3.zip |
clang: Allow ifunc resolvers to accept arguments
When ifunc support was added to Clang (r265917) it did not allow
resolvers to take function arguments. This was based on GCC's
documentation, which states resolvers return a pointer and take no
arguments.
However, GCC actually allows resolvers to take arguments, and glibc (on
non-x86 platforms) and FreeBSD (on x86 and arm64) pass some CPU
identification information as arguments to ifunc resolvers. I believe
GCC's documentation is simply incorrect / out-of-date.
FreeBSD already removed the prohibition in their in-tree Clang copy.
Differential Revision: https://reviews.llvm.org/D52703
llvm-svn: 344100
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index dbea1fc7112..12ed65cf267 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -322,8 +322,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(); |