[PATCH] D15306: [llvm-profdata] Add support for weighted merge of profile data (2nd try)

Nathan Slingerland via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 16:02:55 PST 2015


This check also addresses the edge case of a path containing a ':' but the
file does not exist.
Without it the input would be interpreted as specifying a weight -
reporting an invalid weight error - rather than file does not exist.

On Mon, Dec 7, 2015 at 3:45 PM, Justin Bogner <mail at justinbogner.com> wrote:

> David Li via llvm-commits <llvm-commits at lists.llvm.org> writes:
> > davidxl added inline comments.
> >
> > ================
> > Comment at: tools/llvm-profdata/llvm-profdata.cpp:198
> > @@ +197,3 @@
> > +  if (WeightStr.find_first_of("/\\") != StringRef::npos) {
> > +    // Weight string contains a path delimiter - something went wrong
> with
> > +    // parsing (likely due to platform-specific behavior with mixed path
> > ----------------
> > Can you add a comment indicating this works around a bug in
> sys::fs::exists()?
>
> Shouldn't we just fix sys::fs::exists()? This check seems questionable.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151207/1bf59067/attachment.html>


More information about the llvm-commits mailing list