[llvm] [SystemZ][z/OS] TXT records in the GOFF reader (PR #74526)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 01:30:17 PDT 2024
================
@@ -481,10 +477,7 @@ GOFFObjectFile::getSectionContents(DataRefImpl Sec) const {
ESDRecord::getFillByteValue(EdEsdRecord, FillByte);
// Initialize section with fill byte.
- auto DataPtr =
- std::make_pair(SectionSize, std::make_unique<uint8_t[]>(SectionSize));
- uint8_t *Data = DataPtr.second.get();
- memset(Data, FillByte, SectionSize);
+ SmallVector<uint8_t> Data(SectionSize, FillByte);
----------------
jh7370 wrote:
Elsewhere, you've used the version with `0` as the second template parameter, whereas here you've omitted it. Could you explain why you've decided to use each version (in review comments, not code comments)?
https://github.com/llvm/llvm-project/pull/74526
More information about the llvm-commits
mailing list