r350776 - [Sema] Mark target of __attribute__((alias("target"))) used for C

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 11 05:13:44 PST 2019


On Thu, Jan 10, 2019 at 09:58:39AM -0800, Nick Desaulniers via cfe-commits wrote:
> On Thu, Jan 10, 2019 at 7:26 AM Nico Weber <thakis at chromium.org> wrote:
> >
> > Aren't C names sometimes slightly mangled too? For example, on macOS they're prefixed by a _, doesn't that have to be undone there?
> 
> Sure, but short of instantiating a demangler in Sema or rewriting how
> Clang checks for unused variables, this quickly cuts down on tens of
> false negatives when building the Linux kernel with various driver
> configurations enabled.  The code review points out this is
> suboptimal.

Can't you build a map of mangled names to function instances instead?
That should be pretty cheap to do any avoids the whole unmangling dance.
It would also fix cases like functions explicitly being renamed.

Joerg


More information about the cfe-commits mailing list