projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4739176
)
[ObjCopy][NFC] Remove unneeded zero initialization
author
Fangrui Song
<i@maskray.me>
Wed, 18 May 2022 16:42:31 +0000
(09:42 -0700)
committer
Fangrui Song
<i@maskray.me>
Wed, 18 May 2022 16:42:31 +0000
(09:42 -0700)
getNewMemBuffer has called memset.
Reviewed By: alexander-shaposhnikov
Differential Revision: https://reviews.llvm.org/D125833
llvm/lib/ObjCopy/MachO/MachOWriter.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/ObjCopy/MachO/MachOWriter.cpp
b/llvm/lib/ObjCopy/MachO/MachOWriter.cpp
index
307b2ac
..
a94764a
100644
(file)
--- a/
llvm/lib/ObjCopy/MachO/MachOWriter.cpp
+++ b/
llvm/lib/ObjCopy/MachO/MachOWriter.cpp
@@
-651,7
+651,6
@@
Error MachOWriter::write() {
return createStringError(errc::not_enough_memory,
"failed to allocate memory buffer of " +
Twine::utohexstr(TotalSize) + " bytes");
- memset(Buf->getBufferStart(), 0, totalSize());
writeHeader();
writeLoadCommands();
writeSections();