Skip to content

Commit ebac9f4

Browse files
Revert "[NFC][SampleFDO] In text sample prof reader, report dreport more concrete parsing errors for different line types" (#155121)
Reverts #154885 to fix build bot failure (https://lab.llvm.org/buildbot/#/builders/144/builds/33611)
1 parent 52b0e3f commit ebac9f4

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

llvm/lib/ProfileData/SampleProfReader.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -382,16 +382,9 @@ std::error_code SampleProfileReaderText::readImpl() {
382382
if (!ParseLine(*LineIt, LineTy, Depth, NumSamples, LineOffset,
383383
Discriminator, FName, TargetCountMap, FunctionHash,
384384
Attributes, IsFlat)) {
385-
switch (LineTy) {
386-
case LineType::Metadata:
387-
reportError(LineIt.line_number(),
388-
"Cannot parse metadata: " + *LineIt);
389-
break;
390-
default:
391-
reportError(LineIt.line_number(),
392-
"Expected 'NUM[.NUM]: NUM[ mangled_name:NUM]*', found " +
393-
*LineIt);
394-
}
385+
reportError(LineIt.line_number(),
386+
"Expected 'NUM[.NUM]: NUM[ mangled_name:NUM]*', found " +
387+
*LineIt);
395388
return sampleprof_error::malformed;
396389
}
397390
if (LineTy != LineType::Metadata && Depth == DepthMetadata) {

0 commit comments

Comments
 (0)