<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:0in;
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";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal" style="margin-left:.5in">what's the motivation not to use the LLVM versions of these enums<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"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I originally implemented the Clang bits for debugger tuning using the LLVM enum (r256063). However this caused build failures in clang-tools-extra (which I
didn't have checked out locally) because having CodeGenOptions.h pull in the extra LLVM header caused confusion in some unqualified name references.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Rather than introduce the extra qualifiers in clang-tools-extra (I looked, it would have taken a bit to sort everything out) I undid the dependency on the LLVM
headers and just replicated the enum in Clang. The only place in Clang that still "really" needed the LLVM enum is BackendUtil.cpp (natch) and it is careful not to assume the two enums are defined the same way. This got committed in r256078.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">However, I wasn't thorough enough about digging out the LLVM dependencies, and Driver is still using the LLVM enum.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If I'd gotten the Driver part right the first time around, Benny would've had to move both enums in his 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">This Clang-versus-LLVM consideration applies only to the tuning enum, btw; LLVM doesn't have an analog of DebugInfoKind.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> David Blaikie [mailto:dblaikie@gmail.com]
<br>
<b>Sent:</b> Friday, February 05, 2016 11:06 AM<br>
<b>To:</b> Robinson, Paul; Adrian Prantl; Eric Christopher; Benjamin Kramer<br>
<b>Cc:</b> cfe-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [cfe-dev] Cleanup on aisle DebugInfo enums<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Sounds plausible.<br>
<br>
(just to check: what's the motivation not to use the LLVM versions of these enums if they match the desired semantics? (I imagine there are many good reasons not to use them, just figure it's worth writing down in this thread so it's clear for historic purposes))<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Feb 5, 2016 at 10:57 AM, Robinson, Paul via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">In r259489, Benny Kramer moved the DebugInfoKind enum into its own<br>
header, include/clang/Driver/DebugInfoKind.h. This was to prevent<br>
Driver from pulling in headers from Frontend. However, this leaves<br>
the enum in kind of a weird place, I think Basic would be better (and<br>
not re-introduce the problem Benny was solving).<br>
<br>
Wondering why the tuning enum didn't cause the same problem, I found<br>
that when I created the Clang enum, I didn't make Driver use it; it's<br>
still using the LLVM version of the enum. While this is not<br>
technically wrong (you could rearrange the values and it would do no<br>
harm) it's an inconsistency within Clang.<br>
<br>
But, if I make Driver use the tuning enum from Clang's CodeGenOptions,<br>
then we'll have the same problem that prompted r259489 in the first<br>
place--Driver depending on Frontend. Rather than create Yet Another<br>
Header, it would be convenient to put the tuning enum in the same<br>
place as DebugInfoKind, as they are topically related and commonly<br>
used in the same places.<br>
<br>
I propose to do the following:<br>
<br>
Patch #1 (totally mechanical)<br>
- move DebugInfoKind.h from Driver to Basic<br>
- rename it to DebugInfoOptions.h<br>
This will take care of all the #include renaming in one go.<br>
<br>
Patch #2 (basically mechanical)<br>
- move the DebuggerKind enum from CodeGenOptions.h to DebugInfoOptions.h<br>
- fix up Driver to use this enum instead of the LLVM equivalent.<br>
<br>
Or I can do it all at once, the combined patch would still be<br>
reasonable I think.<br>
<br>
Sound okay?<br>
--paulr<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>