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

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 19:37:50 PST 2015


davidxl added a comment.

I think the right fix is:

StringRef WeightStr;
​std::tie(FileName, WeightStr) = Input.rsplit(':');
​ if (!sys::fs::exists(FileName) && !sys::fs::exists(Input)) {

    // report missing file error;
  }
  else if (sys::fs::exists(Input)) {
    // add input 
   }
  else {
     assert (!WeightStr.empty());
     // check WeightStr format 
     ...
  }

​


http://reviews.llvm.org/D15306





More information about the llvm-commits mailing list