[llvm] [nfc][InstrProf]Remove 'offsetOf' when parsing indexed profiles (PR #93346)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 11:07:36 PDT 2024


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 c54657887b2cd88f0745c151fec0b15a8a7d1e44 737a7a9f54669143e5598533e72b16d598f632aa -- llvm/lib/ProfileData/InstrProf.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index f074f7703b..5d5f7e3dbe 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -1649,7 +1649,8 @@ Expected<Header> Header::readFromBuffer(const unsigned char *Buffer) {
 
   // Read the version.
   H.Version = readNext(Buffer);
-  if (H.getIndexedProfileVersion() > IndexedInstrProf::ProfVersion::CurrentVersion)
+  if (H.getIndexedProfileVersion() >
+      IndexedInstrProf::ProfVersion::CurrentVersion)
     return make_error<InstrProfError>(instrprof_error::unsupported_version);
 
   static_assert(IndexedInstrProf::ProfVersion::CurrentVersion == Version12,

``````````

</details>


https://github.com/llvm/llvm-project/pull/93346


More information about the llvm-commits mailing list