Author: Mingming Liu
Date: 2025-08-23T14:43:13-07:00
New Revision: 5c51d41598ea16142a67812f647fcb7d301e0115

URL: 
https://github.com/llvm/llvm-project/commit/5c51d41598ea16142a67812f647fcb7d301e0115
DIFF: 
https://github.com/llvm/llvm-project/commit/5c51d41598ea16142a67812f647fcb7d301e0115.diff

LOG: Revert "[NFC][SampleFDO] In text sample prof reader, report dreport more 
conc…"

This reverts commit 52b0e3f1ccd81198f285a4e90558ed2015dc1db3.

Added: 
    

Modified: 
    llvm/lib/ProfileData/SampleProfReader.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ProfileData/SampleProfReader.cpp 
b/llvm/lib/ProfileData/SampleProfReader.cpp
index 15eb1d174d6fa..d147222fe2ce6 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -382,16 +382,9 @@ std::error_code SampleProfileReaderText::readImpl() {
       if (!ParseLine(*LineIt, LineTy, Depth, NumSamples, LineOffset,
                      Discriminator, FName, TargetCountMap, FunctionHash,
                      Attributes, IsFlat)) {
-        switch (LineTy) {
-        case LineType::Metadata:
-          reportError(LineIt.line_number(),
-                      "Cannot parse metadata: " + *LineIt);
-          break;
-        default:
-          reportError(LineIt.line_number(),
-                      "Expected 'NUM[.NUM]: NUM[ mangled_name:NUM]*', found " +
-                          *LineIt);
-        }
+        reportError(LineIt.line_number(),
+                    "Expected 'NUM[.NUM]: NUM[ mangled_name:NUM]*', found " +
+                        *LineIt);
         return sampleprof_error::malformed;
       }
       if (LineTy != LineType::Metadata && Depth == DepthMetadata) {


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to