[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:00:16 PST 2015


slingn added inline comments.

================
Comment at: tools/llvm-profdata/llvm-profdata.cpp:198
@@ +197,3 @@
+
+  if (WeightStr.find_first_of("/\\") != StringRef::npos) {
+    // Weight parsing failure - weight string contains a path delimiter.
----------------
It isn't exclusively a work-around for the issue with sys::fs::exists() - but I've tried to make the explanation clearer in the comments.

With this check the user will get a meaningful error message (file not found) on UNIX in the (obscure) situation of an invalid path containing ':'.


http://reviews.llvm.org/D15306





More information about the llvm-commits mailing list