[MachO] Fix UB in memcpy
authorShoaib Meenai <smeenai@fb.com>
Tue, 28 Apr 2020 18:29:30 +0000 (11:29 -0700)
committerShoaib Meenai <smeenai@fb.com>
Tue, 28 Apr 2020 18:33:54 +0000 (11:33 -0700)
commitaf40bff32db7840cfbe07278ff0c498604acc5f0
treedbbd1ddf4128d5d2c0dd680baca2316e3466c1a8
parent1b56980845baaa04f98da7d0a85bbde26be3ed4b
[MachO] Fix UB in memcpy

UBSan complains about a memcpy with a null pointer, so just skip the
memcpy call if the data is empty.
lld/MachO/InputSection.cpp