<div dir="ltr">This check also addresses the edge case of a path containing a ':' but the file does not exist.<div>Without it the input would be interpreted as specifying a weight - reporting an invalid weight error - rather than file does not exist.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 3:45 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.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="">David Li via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> writes:<br>
> davidxl added inline comments.<br>
><br>
> ================<br>
> Comment at: tools/llvm-profdata/llvm-profdata.cpp:198<br>
> @@ +197,3 @@<br>
> +  if (WeightStr.find_first_of("/\\") != StringRef::npos) {<br>
> +    // Weight string contains a path delimiter - something went wrong with<br>
> +    // parsing (likely due to platform-specific behavior with mixed path<br>
> ----------------<br>
> Can you add a comment indicating this works around a bug in sys::fs::exists()?<br>
<br>
</span>Shouldn't we just fix sys::fs::exists()? This check seems questionable.<br>
</blockquote></div><br></div>