[llvm] [llvm-profgen] Formatting StringRef iteration in isLBRSample (PR #211462)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 21:59:22 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-pgo
Author: HighW4y2H3ll
<details>
<summary>Changes</summary>
Follow up on https://github.com/llvm/llvm-project/pull/211182 Cleanup the StringRef iteration.
---
Full diff: https://github.com/llvm/llvm-project/pull/211462.diff
1 Files Affected:
- (modified) llvm/tools/llvm-profgen/PerfReader.cpp (+1-1)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/211462
More information about the llvm-commits
mailing list