<div dir="ltr">Possibly - you probably want to pull in some folks who own/are familiar with that part of the code base to see if that's appropriate layering here? (it seems slightly strange to talk about tokens outside the context of a parser to me - but I guess there's need for it)<br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 14, 2018 at 7:41 AM Roger Pau Monné <<a href="mailto:royger@freebsd.org">royger@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Sorry for the delay, I'm finally back home.<br>
<br>
On Tue, Mar 06, 2018 at 05:33:18PM +0000, Oliver Stannard wrote:<br>
> Ah, I see what you mean.<br>
><br>
> The layering violation wasn’t added by my patch, I just turned it into a build failure when doing a shared-libraries build.<br>
><br>
> The original layering violation it was committed a few weeks ago: <a href="https://reviews.llvm.org/rL325139" rel="noreferrer" target="_blank">https://reviews.llvm.org/rL325139</a>, I’ve added the author and committer of that patch.<br>
><br>
> Oliver<br>
><br>
> From: David Blaikie [mailto:<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>]<br>
> Sent: 06 March 2018 17:28<br>
> To: Pavel Labath<br>
> Cc: Oliver Stannard; Pavel Labath via llvm-commits<br>
> Subject: Re: [llvm] r326810 - [Asm] Fix another layering violation in assmebly macro dumping<br>
><br>
> Agreed - this is still a layering violation. Including an MCParser header from MC violates the dependencies (MCParser depends on MC, not the other way around).<br>
<br>
So I've been looking into this, and AFAICT the problem is that<br>
MCAsmMacro.h includes MCParser/MCAsmLexer.h in order to get the<br>
definition of AsmToken.<br>
<br>
Would it be fine to move the definition of AsmToken into<br>
MC/MCAsmToken.h (and rename AsmToken to MCAsmToken)? I don't see<br>
AsmToken itself depending on any other MCParser definitions.<br>
<br>
Thanks, Roger.<br>
</blockquote></div>