<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>I’ve still not seen any feedback on this patch. Could someone take a look?</div><div><br></div><div>-Puyan</div><br><div><div>On Aug 12, 2013, at 10:12 AM, Puyan Lotfi <<a href="mailto:plotfi@apple.com">plotfi@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Aug 10, 2013, at 1:04 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 9, 2013 at 2:31 PM, Puyan Lotfi <span dir="ltr"><<a href="mailto:plotfi@apple.com" target="_blank">plotfi@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;">Hi All<br>
<br>
I have some changes ready for adding StringRef support to the llvm CommandLine library:<br>
<br>
- The purpose of the change is to reduce malloc/free costs associated with std::string since most of the time the cl options could point point to argv pointers.<br>
- cl::opt<std::string> still works and I kept it around because I noticed some tools generate string values for options at runtime.<br></blockquote><div><br></div><div>Could you explain/point out examples of this? It seems sort of reasonable to just say clients own strings for the life of the tools they invoke (since that's the contract with the actual command line interaction - argv's lifetime is managed beyond the scope of the user-written source) & thus should always be StringRefs.</div>
</div></div></div></blockquote><div><br></div><div>Example of which? Of tools generating string values at runtime? I noticed that lli has a cl::opt<string> for its output filename that it generates at runtime based on the input filename (it’s just changing the file extension). This happens at tools/llc/llc.cpp:103 in GetOutputStream().</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- This patch also includes changes to several tools in llvm that use this library so that they could use cl:opt<StringRef> instead of cl:opt<std::string> wherever possible.<br>
<br>
Could someone on the list review my changes, give me some feedback, and later check in the changes when they look ready (as I do not have commit access).<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
-Puyan<br>
<br>
</font></span><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></body></html>