[cfe-dev] Using IFUNC with template functions

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 18 12:04:59 PST 2020


On Wed, Nov 18, 2020 at 06:12:58PM +0000, David Chisnall via cfe-dev wrote:
> I'd suggest extending the ifunc attribute parser to accept <> at the end of
> the identifier for the resolver to signify template arguments and require
> that the resolver takes the same template arguments as the function itself.

I'd suggest a different direction. I've mentioned a couple of times that
having a builtin for obtaining the mangled name for a function reference
would be useful. One common use case of that is dlopen, but this is
actually another. So instead of changing the ifunc attribute parser
accept expressions that can be folded to string constants and then the
mangled-name builtin.

Joerg


More information about the cfe-dev mailing list