[cfe-dev] Why are the manglers in AST/ instead of CodeGen/ ?

Charles Davis cdavis5x at gmail.com
Wed Aug 28 22:44:08 PDT 2013


On Aug 28, 2013, at 10:56 PM, David Majnemer wrote:

> Hello,
> 
> A little backstory:
> 
> I am working on improving the mangling non-type template arguments that bind pointers to members for the MS ABI and have hit on something rather unfortunate: mangling them is equivalent to mangling their offset in the record as a literal. The "obvious" thing to do would be to ask CodeGen what that constant offset would be, however that would be a layering violation because mangling happens in AST, not CodeGen.
> 
> I'd like to know if the layer that mangling happens in is a consequence of design, or a philosophical choice or some other necessity.
Originally, it was in CodeGen. I forget why it was moved, though. Ask Peter (CC'd). He'll know more--he was the one who moved it, after all.

Chip

> 
> Answering this question would tell me if we could move mangling out or AST and into CodeGen or if I should instead move the member pointer layout calculation to MicrosoftCXXABI.cpp
> 
> Thanks
> -- 
> David Majnemer
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list