[flang-commits] [flang] [Flang][NFCI] Use abstraction for binary scalar data (PR #212956)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Tue Sep 1 07:56:32 PDT 2026
================
@@ -93,6 +93,24 @@ template <int BITS, bool IS_LIKE_C = true> class Logical {
return {word_.IEOR(that.word_)};
}
+ /// Number of bytes that FromRawBytes/StoreRawBytes would accesses.
+ static constexpr std::size_t bytesStored() { return Word::bytesStored(); }
+
+ /// De-serializes a logical from \p raw. \p expectedSize must match the the
+ /// number of bytes to be read.
+ static Logical FromRawBytes(
+ const void *raw, [[maybe_unused]] std::size_t expectedSize) {
+ return Logical{Word::FromRawBytes(raw, expectedSize)};
+ }
+
+ /// Serializes this logical to \p dst. \p expectedSize must match the the
+ /// number of bytes to be written. If \p changed points to a boolean, it will
+ /// be set to true if any bytes at \p dst have changed.
+ void StoreRawBytes(void *dst, [[maybe_unused]] size_t expectedSize,
----------------
kparzysz wrote:
Same here and in a few places below.
https://github.com/llvm/llvm-project/pull/212956
More information about the flang-commits
mailing list