]> granicus.if.org Git - clang/commit
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)
commit8937b441bddb04ae6937c10aea6a1ca497d157a8
tree418dfe36b37972d1d2616c51f6a07d15a4e7ff9d
parent51888e56499376384e01d07a55dee8f351feb11c
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344100 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/CodeGen/CodeGenModule.cpp
test/Sema/attr-ifunc.c