[PATCH] D98437: [SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and END records
Anirudh Prasad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 12 13:27:11 PDT 2021
anirudhp added inline comments.
================
Comment at: llvm/include/llvm/Object/GOFF.h:73
+ void setContinuation(bool Continuation) {
+ uint8_t Value = Continuation ? 1 : 0;
+ setBits(1, 6, 1, Value);
----------------
Couldn't we do away the conditional assignment to `Value` and just pass `Continuation` directly to `setBits`?
================
Comment at: llvm/include/llvm/Object/GOFF.h:78
+ void setContinued(bool Continued) {
+ uint8_t Value = Continued ? 1 : 0;
+ setBits(1, 7, 1, Value);
----------------
Same comment as above.
================
Comment at: llvm/include/llvm/Object/GOFF.h:100
+ /// Used to pack bit fields into one byte. Fields are packed LEFT TO RIGHT.
+ /// Bit index zero is the MOST SIGNIFICANT BIT of the byte.
+ ///
----------------
minor nit: not too sure why "MSB" is capitalized here.
================
Comment at: llvm/include/llvm/Object/GOFF.h:224
+ uint8_t Value = ReadOnly ? 1 : 0;
+ setBits(63, 4, 1, Value);
+ }
----------------
Same comment about using bool value directly in the next function call
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98437/new/
https://reviews.llvm.org/D98437
More information about the llvm-commits
mailing list