[PATCH] D60967: Move setTargetAttributes after setGVProperties in SetFunctionAttributes

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 12:54:37 PDT 2019

rjmccall added a comment.

In D60967#1476057 <https://reviews.llvm.org/D60967#1476057>, @scott.linder wrote:

> In D60967#1476029 <https://reviews.llvm.org/D60967#1476029>, @rjmccall wrote:
> > Shouldn't it be an error if the user tries to give it hidden visibility?
> We effectively consider the user explicitly specifying that a symbol is e.g. a `kernel` to also carry with it visibility information. We don't want to require the user to redundantly specify that a kernel is not hidden, when it is never meaningful for it to be hidden.

I understand, but if the user explicitly gives it hidden visibility, you should still diagnose that.

Also, shouldn't you just handle this by treating the kernel attribute as a source of explicit visibility at the Sema/AST level?

  rC Clang



More information about the cfe-commits mailing list