Skip to content

Conversation

@mingmingl-llvm
Copy link
Contributor

@llvmbot llvmbot added the PGO Profile Guided Optimizations label Aug 23, 2025
@mingmingl-llvm mingmingl-llvm merged commit ebac9f4 into main Aug 23, 2025
9 of 11 checks passed
@mingmingl-llvm mingmingl-llvm deleted the revert-154885-users/mingmingl-llvm/sampleproferror branch August 23, 2025 21:43
@llvmbot
Copy link
Member

llvmbot commented Aug 23, 2025

@llvm/pr-subscribers-pgo

Author: Mingming Liu (mingmingl-llvm)

Changes

Reverts llvm/llvm-project#154885 to fix build bot failure (https://lab.llvm.org/buildbot/#/builders/144/builds/33611)


Full diff: https://github.com/llvm/llvm-project/pull/155121.diff

1 Files Affected:

  • (modified) llvm/lib/ProfileData/SampleProfReader.cpp (+3-10)
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) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PGO Profile Guided Optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants