diff options
| author | Tom Stellard <tstellar@redhat.com> | 2018-11-30 18:15:48 +0000 |
|---|---|---|
| committer | Tom Stellard <tstellar@redhat.com> | 2018-11-30 18:15:48 +0000 |
| commit | 5b036d9701f6a8190b75d74b95a6b5b52ab5f5ad (patch) | |
| tree | a8f81441dd3d8895b846ae16f65c7bff13d64d54 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 4d730d8ff36735379b88ac367fa7e77adeee48f4 (diff) | |
| download | bcm5719-llvm-5b036d9701f6a8190b75d74b95a6b5b52ab5f5ad.tar.gz bcm5719-llvm-5b036d9701f6a8190b75d74b95a6b5b52ab5f5ad.zip | |
Merging r344100:
------------------------------------------------------------------------
r344100 | emaste | 2018-10-09 17:34:17 -0700 (Tue, 09 Oct 2018) | 16 lines
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: 348012
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 155ee6c6af1..76112e191c7 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -320,8 +320,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(); |

