[PATCH] D54055: CXXNameMangler::mangleFunctionParam: fix assertion

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 2 22:33:46 PDT 2018


jfb added a comment.

In https://reviews.llvm.org/D54055#1286396, @rjmccall wrote:

> That sounds more like this use of the mangler isn't manipulating the function type context correctly.  But actually I think the problem is that it's ridiculous to assume that arbitrary local declarations have meaningful manglings.  Why are we calling `getStaticDeclName` on a variable that's obviously not static?


It was done in `CodeGenFunction::EmitAutoVarInit` a while ago. I moved it since then, but it's the same thing. I'm happy to mangle it any other way. At the end of the day we just need some name for an (unnamed address) global which is synthesized from a function-local initialization. We could just take the mangled function name and append something to it.


Repository:
  rC Clang

https://reviews.llvm.org/D54055





More information about the cfe-commits mailing list