[llvm] [BOLT] Use StringRef::contains (NFC) (PR #92842)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 18:53:02 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-bolt
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/92842.diff
1 Files Affected:
- (modified) bolt/lib/Profile/DataAggregator.cpp (+1-1)
``````````diff
diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp
index e06debcee741e..f55caa7f03f73 100644
--- a/bolt/lib/Profile/DataAggregator.cpp
+++ b/bolt/lib/Profile/DataAggregator.cpp
@@ -1227,7 +1227,7 @@ ErrorOr<Location> DataAggregator::parseLocationOrOffset() {
if (Sep == StringRef::npos)
return parseOffset();
StringRef LookAhead = ParsingBuf.substr(0, Sep);
- if (LookAhead.find_first_of(":") == StringRef::npos)
+ if (!LookAhead.contains(':'))
return parseOffset();
ErrorOr<StringRef> BuildID = parseString(':');
``````````
</details>
https://github.com/llvm/llvm-project/pull/92842
More information about the llvm-commits
mailing list