clang: Allow ifunc resolvers to accept arguments
authorEd Maste <emaste@freebsd.org>
Wed, 10 Oct 2018 00:34:17 +0000 (00:34 +0000)
committerEd Maste <emaste@freebsd.org>
Wed, 10 Oct 2018 00:34:17 +0000 (00:34 +0000)
commit8bddfdd59ce2e76d0c99785a3838d4b28fd556b3
treed601abc8cad5d17d2dcdc0474f8dd7b315cbfc2b
parent2043a58abeacda130b01fba8f53aacc0915e6b25
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
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/Sema/attr-ifunc.c