summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2018-10-10 00:34:17 +0000
committerEd Maste <emaste@freebsd.org>2018-10-10 00:34:17 +0000
commit8bddfdd59ce2e76d0c99785a3838d4b28fd556b3 (patch)
treed601abc8cad5d17d2dcdc0474f8dd7b315cbfc2b /clang/lib/CodeGen/CodeGenModule.cpp
parent2043a58abeacda130b01fba8f53aacc0915e6b25 (diff)
downloadbcm5719-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.cpp2
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();
OpenPOWER on IntegriCloud