[llvm] [nfc][InstrProfReader]Store header fields in native endianness (PR #92947)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 20:40:44 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 7b977e0f644c43232732e149b03d41de321d804e 89e808c00ab4982ed6bac8681b55499b715f8d24 -- llvm/include/llvm/ProfileData/InstrProf.h llvm/lib/ProfileData/InstrProf.cpp llvm/lib/ProfileData/InstrProfReader.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 d19ce075ad..04dd7bac02 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -1624,7 +1624,8 @@ inline size_t constexpr offsetOf(T1 T2::*Member) {
// native endianness if necessary.
static inline uint64_t read(const unsigned char *Buffer, size_t Offset) {
using namespace ::support;
- return endian::read<uint64_t, llvm::endianness::little, unaligned>(Buffer + Offset);
+ return endian::read<uint64_t, llvm::endianness::little, unaligned>(Buffer +
+ Offset);
}
Expected<Header> Header::readFromBuffer(const unsigned char *Buffer) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/92947
More information about the llvm-commits
mailing list