[llvm] [llvm-profgen] Formatting StringRef iteration in isLBRSample (PR #211462)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 21:58:45 PDT 2026
https://github.com/HighW4y2H3ll created https://github.com/llvm/llvm-project/pull/211462
Follow up on https://github.com/llvm/llvm-project/pull/211182 Cleanup the StringRef iteration.
>From 6f30af931c11dba93c6584b02800407999c0c53b Mon Sep 17 00:00:00 2001
From: h2h <h2h at meta.com>
Date: Wed, 22 Jul 2026 21:52:04 -0700
Subject: [PATCH] [llvm-profgen] Formatting StringRef iteration in isLBRSample
---
llvm/tools/llvm-profgen/PerfReader.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/tools/llvm-profgen/PerfReader.cpp b/llvm/tools/llvm-profgen/PerfReader.cpp
index 976063ecbe98d..5fb1c6d252915 100644
--- a/llvm/tools/llvm-profgen/PerfReader.cpp
+++ b/llvm/tools/llvm-profgen/PerfReader.cpp
@@ -1182,7 +1182,7 @@ bool PerfScriptReader::isLBRSample(StringRef Line, bool CheckLineStart) {
// Line might start with IP or only contain brstack. Check first two records
// and fail if no record exists.
Line.split(Records, " ", 2, CheckLineStart);
- for (const StringRef &Record : Records)
+ for (StringRef Record : Records)
if (Record.starts_with("0x") && Record.contains('/'))
return true;
return false;
More information about the llvm-commits
mailing list