jfb added a comment.

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

> In https://reviews.llvm.org/D54055#1286397, @jfb wrote:
>
> > 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.
>
>
> Okay.  I assume this is internal-linkage and the name is just for debugging 
> purposes?  Maybe we could have an API to generate a best-effort name mangling 
> that could intentionally punt on variably-modified types.


I can do that, if you think that's the right approach. Or I can use mangled 
function name + something (instead of trying to synthesize a static mangling). 
That seems pretty simple and it'll always work.

> (I'm not really sure why the type is being mangled here anyway.)

Maybe the author of http://llvm.org/r127227 knows? :-)


Repository:
  rC Clang

https://reviews.llvm.org/D54055



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to