<div dir="ltr">Hello,<div><br></div><div>A little backstory:</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div><div><br></div><div>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</div>
<div><br></div><div>Thanks</div><div>-- </div><div>David Majnemer</div></div>