[PERF2BOLT] Fix unittest failure
Fix failure caused by commit e549ac072b
"Do not issue parsing error on
weird build ids".
This commit is contained in:
parent
0401dc2913
commit
ba9cc6537c
|
@ -311,6 +311,10 @@ private:
|
|||
/// Consume the entire line
|
||||
void consumeRestOfLine();
|
||||
|
||||
/// True if the next token in the parsing buffer is a new line, but don't
|
||||
/// consume it (peek only).
|
||||
bool checkNewLine();
|
||||
|
||||
/// Parse a single LBR entry as output by perf script -Fbrstack
|
||||
ErrorOr<LBREntry> parseLBREntry();
|
||||
|
||||
|
|
|
@ -1056,6 +1056,10 @@ void DataAggregator::consumeRestOfLine() {
|
|||
Line += 1;
|
||||
}
|
||||
|
||||
bool DataAggregator::checkNewLine() {
|
||||
return ParsingBuf[0] == '\n';
|
||||
}
|
||||
|
||||
ErrorOr<DataAggregator::PerfBranchSample> DataAggregator::parseBranchSample() {
|
||||
PerfBranchSample Res;
|
||||
|
||||
|
@ -2148,7 +2152,7 @@ DataAggregator::parseNameBuildIDPair() {
|
|||
// If one of the strings is missing, don't issue a parsing error, but still
|
||||
// do not return a value.
|
||||
consumeAllRemainingFS();
|
||||
if (checkAndConsumeNewLine())
|
||||
if (checkNewLine())
|
||||
return NoneType();
|
||||
|
||||
ErrorOr<StringRef> NameStr = parseString(FieldSeparator, true);
|
||||
|
|
Loading…
Reference in New Issue