PECOFF: Fix a "memset clearing an object of non-trivial type" warning
authorPavel Labath <pavel@labath.sk>
Tue, 30 Jul 2019 08:42:42 +0000 (08:42 +0000)
committerPavel Labath <pavel@labath.sk>
Tue, 30 Jul 2019 08:42:42 +0000 (08:42 +0000)
commit5c43ffd6140c2d328fec0507abcb564a2f57578a
treed6f59b54cb509eade3f767972d3667c82873743a
parent656ddeb2b7c1a4a824446829e5b88b38307e1e08
PECOFF: Fix a "memset clearing an object of non-trivial type" warning

This time, the warning pointed to an actual problem, because the
coff_opt_header structure contained a std::vector. I guess this happened
to work because the all-zero state was a valid representation of an
empty vector, but its not a good idea to rely on that.

I remove the memset, and have the structure clear its members in the
constructor instead.

llvm-svn: 367299
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h