[compiler-rt] [llvm] [InstrFDO]Record the on-disk header size in indexed profile header (PR #88212)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 11:56:33 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 b79db396599f42d106b930d61e20c9d5146a6866 7cd93b1ec270e8d8d3c4f310a72f3f9833690604 -- compiler-rt/include/profile/InstrProfData.inc llvm/include/llvm/ProfileData/InstrProf.h llvm/include/llvm/ProfileData/InstrProfData.inc llvm/lib/ProfileData/InstrProf.cpp llvm/lib/ProfileData/InstrProfWriter.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 a9af6b2484..b77776cbc6 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -1632,9 +1632,10 @@ Expected<Header> Header::readFromBuffer(const unsigned char *Buffer) {
   auto FieldByteOffsetOrErr = H.knownFieldsEndByteOffset();
   if (FieldByteOffsetOrErr)
 
-  assert(FieldByteOffset != 0 &&
-         "FieldByteOffset specifies the byte offset of the last known field in "
-         "header and should not be zero");
+    assert(
+        FieldByteOffset != 0 &&
+        "FieldByteOffset specifies the byte offset of the last known field in "
+        "header and should not be zero");
 
   // If the version from profile is higher than the currently supported version,
   // read the known defined header fields and discard the rest.

``````````

</details>


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


More information about the llvm-commits mailing list