<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 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 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:"Book Antiqua",serif;
        font-variant:normal !important;
        color:windowtext;
        text-transform:none;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;
        vertical-align:baseline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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-IE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;mso-fareast-language:EN-US'>There used to be a ‘clEnumValEnd’ in LLVM v3.9, but it was removed when I updated to v4.0.  Is this being re-introduced in v5.0?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;mso-fareast-language:EN-US'>Thanks,<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span style='font-family:"Book Antiqua",serif;mso-fareast-language:EN-US'>MartinO<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Book Antiqua",serif;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> llvm-dev [mailto:llvm-dev-bounces@lists.llvm.org] <b>On Behalf Of </b>Bekket McClane via llvm-dev<br><b>Sent:</b> 6 June 2017 15:07<br><b>To:</b> </span><span lang=EN-US style='font-size:11.0pt;font-family:"MS Gothic"'>陳韋任</span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> <chenwj.cs97g@g2.nctu.edu.tw><br><b>Cc:</b> LLVM Mailing List <llvm-dev@lists.llvm.org><br><b>Subject:</b> Re: [llvm-dev] [CommandLine] Missing clEnumValEnd for cl::values in tutorial page<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi chenwj,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for you reminding, It turns out that the function prototype of cl::values had just changed between 4.x and the current trunk(5.x), and the current version is not null terminated anymore. <o:p></o:p></p></div><div><p class=MsoNormal>(The online reference page <a href="http://llvm.org/docs/doxygen/html/CommandLine_8h.html">http://llvm.org/docs/doxygen/html/CommandLine_8h.html</a> is based on 4.x)<o:p></o:p></p></div><div><p class=MsoNormal>In another word, version of the tutorial page seems to be later than that of the reference page<o:p></o:p></p></div><div><p class=MsoNormal>I would close the issue later<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Best Regards,<o:p></o:p></p></div><div><p class=MsoNormal>McClane<o:p></o:p></p></div><div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span style='font-family:"MS Gothic"'>陳韋任</span> <<a href="mailto:chenwj.cs97g@g2.nctu.edu.tw">chenwj.cs97g@g2.nctu.edu.tw</a>> <span style='font-family:"MS Gothic"'>於</span> 2017<span style='font-family:"MS Gothic"'>年</span>6<span style='font-family:"MS Gothic"'>月</span>6<span style='font-family:"MS Gothic"'>日</span> <span style='font-family:"MS Gothic"'>下午</span>9:15 <span style='font-family:"MS Gothic"'>寫道:</span><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'>Hi Bekket,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'>  I don't see any use case in the codebase adding clEnumValEnd at the end of list (for example, [1]), I also don't see there is<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'>clEnumValEnd. Do I miss something here?<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'>[1] <a href="http://llvm.org/doxygen/DwarfDebug_8cpp_source.html">http://llvm.org/doxygen/DwarfDebug_8cpp_source.html</a><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'>Regards,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'>chenwj<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>2017-06-06 9:53 GMT+08:00 Bekket McClane via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>:<o:p></o:p></p><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>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Can anyone help reviewing the code?<o:p></o:p></p></div><div><p class=MsoNormal>I think this revision is pretty important regarding that the command line library is also used in many non-LLVM projects.<o:p></o:p></p></div><div><p class=MsoNormal>It’s nice to provide a correct guideline to whom use the library for the first time.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>B.R<o:p></o:p></p></div><div><p class=MsoNormal>McClane<o:p></o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Bekket McClane <<a href="mailto:bekket.mcclane@gmail.com" target="_blank">bekket.mcclane@gmail.com</a>> <span style='font-family:"MS Gothic"'>於</span> 2017<span style='font-family:"MS Gothic"'>年</span>6<span style='font-family:"MS Gothic"'>月</span>3<span style='font-family:"MS Gothic"'>日</span> <span style='font-family:"MS Gothic"'>下午</span>9:00 <span style='font-family:"MS Gothic"'>寫道:</span><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Hi,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The argument list for cl::values in command line library should be end with null or clEnumValEnd. But the tutorial page(<a href="http://llvm.org/docs/CommandLine.html" target="_blank">http://llvm.org/docs/CommandLine.html</a>) doesn’t follow the rule, which would cause program crash during runtime.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I’d send a code review: <a href="https://reviews.llvm.org/D33861" target="_blank">https://reviews.llvm.org/D33861</a><o:p></o:p></p></div><div><p class=MsoNormal>Please cc other folks related to this part.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Best Regards,<o:p></o:p></p></div><div><p class=MsoNormal>Bekket McClane<o:p></o:p></p></div></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><p class=MsoNormal>Wei-Ren Chen (<span style='font-family:"MS Gothic"'>陳韋任</span>)<br>Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank">https://people.cs.nctu.edu.tw/~chenwj</a><o:p></o:p></p></div></div></div></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>