[llvm-branch-commits] [llvm-profgen][NFC] Factor out parseAddress (PR #191594)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Apr 10 21:02:49 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/tools/llvm-profgen/PerfReader.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/tools/llvm-profgen/PerfReader.cpp b/llvm/tools/llvm-profgen/PerfReader.cpp
index 9dda11a7a..d9c2794f7 100644
--- a/llvm/tools/llvm-profgen/PerfReader.cpp
+++ b/llvm/tools/llvm-profgen/PerfReader.cpp
@@ -657,7 +657,8 @@ void HybridPerfReader::unwindSamples() {
}
/// Parse a hex address from \p Str.
-static bool parseAddress(StringRef Str, uint64_t &Addr, bool HasPrefix = false) {
+static bool parseAddress(StringRef Str, uint64_t &Addr,
+ bool HasPrefix = false) {
if (Str.consume_front("0x") != HasPrefix)
return false;
return Str.getAsInteger(16, Addr);
``````````
</details>
https://github.com/llvm/llvm-project/pull/191594
More information about the llvm-branch-commits
mailing list