[PATCH] D125833: [ObjCopy][NFC] Remove unneeded zero initialization

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 09:42:50 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG087ef34fffb2: [ObjCopy][NFC] Remove unneeded zero initialization (authored by MaskRay).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125833/new/

https://reviews.llvm.org/D125833

Files:
  llvm/lib/ObjCopy/MachO/MachOWriter.cpp


Index: llvm/lib/ObjCopy/MachO/MachOWriter.cpp
===================================================================
--- llvm/lib/ObjCopy/MachO/MachOWriter.cpp
+++ llvm/lib/ObjCopy/MachO/MachOWriter.cpp
@@ -651,7 +651,6 @@
     return createStringError(errc::not_enough_memory,
                              "failed to allocate memory buffer of " +
                                  Twine::utohexstr(TotalSize) + " bytes");
-  memset(Buf->getBufferStart(), 0, totalSize());
   writeHeader();
   writeLoadCommands();
   writeSections();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125833.430415.patch
Type: text/x-patch
Size: 533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220518/dacbd452/attachment.bin>


More information about the llvm-commits mailing list