<div dir="ltr">Eric,<div><br></div>Did you get a chance to take a look at cleaned up getTargetToolChain() and ?<div><br></div><div>--Artem</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 7, 2015 at 11:04 AM, Artem Belevich <span dir="ltr"><<a href="mailto:tra@google.com" target="_blank">tra@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">In <a href="http://reviews.llvm.org/D9509#167188" target="_blank">http://reviews.llvm.org/D9509#167188</a>, @echristo wrote:<br>
<br>
> Not really happy with the getTargetToolChain changes. Can you go ahead and revisit the necessity of those (and probably the naming of the StringRef argument as well)?<br>
<br>
<br>
</span>getToolChain does two things -- calculates a triple based on default triple, command line args and optional DarwinArch and then selects a toolchain based on the triple. I needed toolchain selection by triple, so I've extracted it into getTargetToolChain.<br>
<br>
Alternative approach would be to extend computeTargetTriple so that it can figure out that I need to get a NVPTX triple based on DarwinArchName (renamed to ArchName?). IMO it's not as clean as using getTargetToolchain(Triple) considering that we already know the triple.<br>
<br>
I've changed the code so it no longer uses computeTargetTriple() directly (and removed forward declaration), but kept getTargetToolchain().<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<a href="http://reviews.llvm.org/D9509" target="_blank">http://reviews.llvm.org/D9509</a><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>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">--Artem Belevich</div></div>
</div>