[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) {
----------------
kparzysz wrote:
Is the attribute needed? `expectedSize` is used in the next line.
https://github.com/llvm/llvm-project/pull/212956
More information about the flang-commits
mailing list