<div dir="ltr">Thanks. I'll make the suggested change and commit the patch shortly.<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 12, 2015 at 3:42 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.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"><div class="h5"><br>
> On 2015-Feb-12, at 14:23, Akira Hatanaka <<a href="mailto:ahatanak@gmail.com">ahatanak@gmail.com</a>> wrote:<br>
><br>
> Address review comments.<br>
><br>
> In summary, this patch makes the following changes:<br>
><br>
> - Change ModuleLinker to stop issuing a warning when the Triple objects compare equal even when the triple strings differ.<br>
> - On Apple platforms, choose the triple that has the larger version number.<br>
><br>
><br>
> <a href="http://reviews.llvm.org/D7591" target="_blank">http://reviews.llvm.org/D7591</a><br>
><br>
> Files:<br>
>  include/llvm/ADT/Triple.h<br>
>  lib/Linker/LinkModules.cpp<br>
>  lib/Support/Triple.cpp<br>
>  test/Linker/Inputs/apple-version/1.ll<br>
>  test/Linker/Inputs/apple-version/2.ll<br>
>  test/Linker/Inputs/apple-version/3.ll<br>
>  test/Linker/Inputs/apple-version/4.ll<br>
>  test/Linker/Inputs/targettriple-a.ll<br>
>  test/Linker/Inputs/targettriple-b.ll<br>
>  test/Linker/Inputs/targettriple-c.ll<br>
>  test/Linker/apple-version.ll<br>
>  test/Linker/targettriple.ll<br>
><br>
> EMAIL PREFERENCES<br>
>  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</div></div>> <D7591.19858.patch><br>
> Index: lib/Support/Triple.cpp<br>
> ===================================================================<br>
> --- lib/Support/Triple.cpp<br>
> +++ lib/Support/Triple.cpp<br>
> @@ -494,6 +494,12 @@<br>
>      ObjectFormat = getDefaultFormat(*this);<br>
>  }<br>
><br>
> +bool Triple::operator==(const Triple &Other) const {<br>
> +  return Arch == Other.Arch && SubArch == Other.SubArch &&<br>
> +         Vendor == Other.Vendor && OS == Other.OS &&<br>
> +         Environment == Other.Environment && ObjectFormat == Other.ObjectFormat;<br>
> +}<br>
> +<br>
<br>
I feel like this logic should just be inline in the header.  It's<br>
easier to verify by eye if it's close to where the fields are<br>
declared.<br>
<br>
Otherwise, LGTM.<br>
<br>
>  std::string Triple::normalize(StringRef Str) {<br>
>    bool IsMinGW32 = false;<br>
>    bool IsCygwin = false;<br>
><br>
<br>
</blockquote></div><br></div></div>