[llvm] [llvm-profgen] Formatting StringRef iteration in isLBRSample (PR #211462)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 22:04:12 PDT 2026
https://github.com/HighW4y2H3ll updated https://github.com/llvm/llvm-project/pull/211462
>From ce5aaf86670c9be5218ea0b6cdd37ad78dbf2fcd 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