<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 5, 2013 at 8:40 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Dec 5, 2013 at 5:11 AM, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>


> Author: ruiu<br>
> Date: Thu Dec  5 07:11:33 2013<br>
> New Revision: 196505<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=196505&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=196505&view=rev</a><br>
> Log:<br>
> Use !! to convert to a boolean value.<br>
<br>
</div>This is to silence that bool conversion 'performance' warning from<br>
MSVC? Should we just disable that warning? It's not actually a real<br>
performance problem ever in my experience, and I've yet to see it find<br>
a bug.</blockquote><div><br></div><div>I made this change because I think it's just easier to read than the original three line code. Not to silence warning or something.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">
><br>
> Modified:<br>
>     lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h<br>
><br>
> Modified: lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h?rev=196505&r1=196504&r2=196505&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h?rev=196505&r1=196504&r2=196505&view=diff</a><br>


> ==============================================================================<br>
> --- lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h (original)<br>
> +++ lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h Thu Dec  5 07:11:33 2013<br>
> @@ -230,11 +230,7 @@ public:<br>
>      return ArrayRef<uint8_t>(p, p + array.size());<br>
>    }<br>
><br>
> -  virtual bool hasInputGraph() {<br>
> -    if (_inputGraph)<br>
> -      return true;<br>
> -    return false;<br>
> -  }<br>
> +  virtual bool hasInputGraph() { return !!_inputGraph; }<br>
><br>
>    void setLibraryGroup(Group *group) { _libraryGroup = group; }<br>
>    Group *getLibraryGroup() const { return _libraryGroup; }<br>
><br>
><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>
</div></div></blockquote></div><br></div></div>