<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ah, I see what you mean.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The layering violation wasn’t added by my patch, I just turned it into a build failure when doing a shared-libraries build.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The original layering violation it was committed a few weeks ago:
<a href="https://reviews.llvm.org/rL325139">https://reviews.llvm.org/rL325139</a>, I’ve added the author and committer of that patch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Oliver<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> David Blaikie [mailto:dblaikie@gmail.com]
<br>
<b>Sent:</b> 06 March 2018 17:28<br>
<b>To:</b> Pavel Labath<br>
<b>Cc:</b> Oliver Stannard; Pavel Labath via llvm-commits<br>
<b>Subject:</b> Re: [llvm] r326810 - [Asm] Fix another layering violation in assmebly macro dumping<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">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>
Please revert or fix the original patch.<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Mar 6, 2018 at 9:00 AM Pavel Labath <<a href="mailto:labath@google.com">labath@google.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Does that really "fix" the violation? I presume the reason you can use T.getString(), but not T.dump() is because the former is inline. However, in properly layered code you should not even be able to see the declaration of typeof(T) if
 you do not have it as your dependency...<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, 6 Mar 2018 at 16:53, Oliver Stannard via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Author: olista01<br>
Date: Tue Mar  6 08:51:17 2018<br>
New Revision: 326810<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=326810&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=326810&view=rev</a><br>
Log:<br>
[Asm] Fix another layering violation in assmebly macro dumping<br>
<br>
AsmToken is in the MCParser library, so we can't use its dump function from<br>
MCAsmMacro in the MC library. Instead, just print the string, which we don't<br>
need the MCParser library for.<br>
<br>
<br>
Modified:<br>
    llvm/trunk/lib/MC/MCAsmMacro.cpp<br>
<br>
Modified: llvm/trunk/lib/MC/MCAsmMacro.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmMacro.cpp?rev=326810&r1=326809&r2=326810&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmMacro.cpp?rev=326810&r1=326809&r2=326810&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/MCAsmMacro.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCAsmMacro.cpp Tue Mar  6 08:51:17 2018<br>
@@ -25,7 +25,7 @@ void MCAsmMacroParameter::dump(raw_ostre<br>
       if (!first)<br>
         OS << ", ";<br>
       first = false;<br>
-      T.dump();<br>
+      OS << T.getString();<br>
     }<br>
   }<br>
   OS << "\n";<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
 or store or copy the information in any medium. Thank you.
</body>
</html>