llvm.org GIT mirror llvm / 3d6f513
[llvm-profdata] Bring back reading profile data from STDIN. This feature was lost in r276197. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276407 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 3 years ago
2 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
2222 4- Merge the binary and text encodings of the profile and check that the
2323 counters have doubled.
2424 RUN: llvm-profdata merge --sample --text %t.profbin %p/Inputs/inline-samples.afdo -o - | FileCheck %s --check-prefix=MERGE1
25 RUN: llvm-profdata merge --sample --text - < %t.profbin %p/Inputs/inline-samples.afdo -o - | FileCheck %s --check-prefix=MERGE1
2526 MERGE1: main:733692:0
2627 MERGE1: 2.3: 120802
2728 MERGE1: 2.3: _Z3fool:492088
318318 static void addWeightedInput(WeightedFileVector &WNI, const WeightedFile &WF) {
319319 StringRef Filename = WF.Filename;
320320 uint64_t Weight = WF.Weight;
321
322 // If it's STDIN just pass it on.
323 if (Filename == "-") {
324 WNI.push_back({Filename, Weight});
325 return;
326 }
327
321328 llvm::sys::fs::file_status Status;
322329 llvm::sys::fs::status(Filename, Status);
323330 if (!llvm::sys::fs::exists(Status))