forked from OSchip/llvm-project
[llvm-profdata] Bring back reading profile data from STDIN.
This feature was lost in r276197. llvm-svn: 276407
This commit is contained in:
parent
4e6fad5760
commit
a81f4728f3
|
@ -23,6 +23,7 @@ RUN: diff %t-bintext %t-text
|
|||
4- Merge the binary and text encodings of the profile and check that the
|
||||
counters have doubled.
|
||||
RUN: llvm-profdata merge --sample --text %t.profbin %p/Inputs/inline-samples.afdo -o - | FileCheck %s --check-prefix=MERGE1
|
||||
RUN: llvm-profdata merge --sample --text - < %t.profbin %p/Inputs/inline-samples.afdo -o - | FileCheck %s --check-prefix=MERGE1
|
||||
MERGE1: main:733692:0
|
||||
MERGE1: 2.3: 120802
|
||||
MERGE1: 2.3: _Z3fool:492088
|
||||
|
|
|
@ -319,6 +319,13 @@ getInputFilenamesFileBuf(const StringRef &InputFilenamesFile) {
|
|||
static void addWeightedInput(WeightedFileVector &WNI, const WeightedFile &WF) {
|
||||
StringRef Filename = WF.Filename;
|
||||
uint64_t Weight = WF.Weight;
|
||||
|
||||
// If it's STDIN just pass it on.
|
||||
if (Filename == "-") {
|
||||
WNI.push_back({Filename, Weight});
|
||||
return;
|
||||
}
|
||||
|
||||
llvm::sys::fs::file_status Status;
|
||||
llvm::sys::fs::status(Filename, Status);
|
||||
if (!llvm::sys::fs::exists(Status))
|
||||
|
|
Loading…
Reference in New Issue