[llvm] 450cf0a - [llvm-profgen] Formatting StringRef iteration in isLBRSample (#211462)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 22:46:13 PDT 2026


Author: HighW4y2H3ll
Date: 2026-07-23T05:46:08Z
New Revision: 450cf0aafeab9fed6666b112b018d3913a36527c

URL: https://github.com/llvm/llvm-project/commit/450cf0aafeab9fed6666b112b018d3913a36527c
DIFF: https://github.com/llvm/llvm-project/commit/450cf0aafeab9fed6666b112b018d3913a36527c.diff

LOG: [llvm-profgen] Formatting StringRef iteration in isLBRSample (#211462)

Follow up on https://github.com/llvm/llvm-project/pull/211182 Cleanup
the StringRef iteration.

Added: 
    

Modified: 
    llvm/tools/llvm-profgen/PerfReader.cpp

Removed: 
    


################################################################################
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