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

David Majnemer david.majnemer at gmail.com
Wed Aug 28 21:56:46 PDT 2013


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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130828/aa732833/attachment.html>


More information about the cfe-dev mailing list