<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 11:41 PM, Bill Wendling <span dir="ltr"><<a href="mailto:isanbard@gmail.com" target="_blank" class="cremed">isanbard@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="HOEnZb adM"><div class="im">On Jun 19, 2013, at 8:28 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" class="cremed">richard@metafoo.co.uk</a>> wrote:<br>

<br>
> On Wed, Jun 19, 2013 at 3:22 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="cremed">dblaikie@gmail.com</a>> wrote:<br>
>> On Wed, Jun 19, 2013 at 3:16 PM, Bill Wendling <<a href="mailto:isanbard@gmail.com" class="cremed">isanbard@gmail.com</a>> wrote:<br>
>>> Author: void<br>
>>> Date: Wed Jun 19 17:16:11 2013<br>
>>> New Revision: 184375<br>
>>><br>
>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=184375&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=184375&view=rev</a><br>
>>> Log:<br>
>>> Make the '==' operator inline.<br>
>>><br>
>>> Modified:<br>
>>>    llvm/trunk/include/llvm/Target/TargetOptions.h<br>
>>><br>
>>> Modified: llvm/trunk/include/llvm/Target/TargetOptions.h<br>
>>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=184375&r1=184374&r2=184375&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=184375&r1=184374&r2=184375&view=diff</a><br>

>>> ==============================================================================<br>
>>> --- llvm/trunk/include/llvm/Target/TargetOptions.h (original)<br>
>>> +++ llvm/trunk/include/llvm/Target/TargetOptions.h Wed Jun 19 17:16:11 2013<br>
>>> @@ -207,9 +207,36 @@ namespace llvm {<br>
>>><br>
>>> // Comparison operators:<br>
>>><br>
>>> -bool operator==(const TargetOptions &LHS, const TargetOptions &RHS);<br>
>>><br>
>>> -static inline bool operator!=(const TargetOptions &LHS, const TargetOptions &RHS) {<br>
>>> +static inline bool operator==(const TargetOptions &LHS,<br>
>>> +                              const TargetOptions &RHS) {<br>
>><br>
>> I'm not sure I've ever seen an op overload as a static member - I<br>
>> guess this isn't really any different than the usual (at least what<br>
>> I've seen) way of doing it as an inline 'friend' definition. (I<br>
>> mention this in case someone else knows a reason to prefer one over<br>
>> the other)<br>
><br>
> This is not a member. Why is it marked static?<br>
<br>
</div></div>So that there aren't multiple copies in the final binaries.</blockquote></div><br>Er, 'inline' is what you want for that. I don't think you need static here.</div></div>