[llvm] [llvm-objcopy] Support SREC output format (PR #75874)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 01:20:54 PST 2024
================
@@ -2813,6 +2813,244 @@ Error IHexWriter::finalize() {
return Error::success();
}
+Error SRECSectionWriterBase::visit(const StringTableSection &Sec) {
+ // Check that sizer has already done its work
+ assert(Sec.Size == Sec.StrTabBuilder.getSize());
+ // we don't need to write anything here the real writer has already done it.
----------------
jh7370 wrote:
Nit: please follow the coding style for comments, starting with capital letters and ending with full stops. Additionally, the guidance for `assert` is to append a message, like in the inline suggestion.
```suggestion
// Check that the sizer has already done its work.
assert(Sec.Size == Sec.StrTabBuilder.getSize() && "Expected section size to have been finalized");
// We don't need to write anything here because the real writer has already done it.
```
https://github.com/llvm/llvm-project/pull/75874
More information about the llvm-commits
mailing list