COFF: Take reference to argument vector using std::vector::data() instead of operator...
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 19 Jun 2015 22:40:05 +0000 (22:40 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 19 Jun 2015 22:40:05 +0000 (22:40 +0000)
commit74ecc89c464a858f261ec279dd202dfafa476d7d
tree6711ab8078c0b3b11d483afba4eb4e2f0786c6b5
parentf00df0af2d0587ead9e36b7161206187e7b24622
COFF: Take reference to argument vector using std::vector::data() instead of operator[](0).

This avoids undefined behaviour caused by an out-of-range access if the
vector is empty, which can happen if an object file's directive section
contains only whitespace.

llvm-svn: 240183
lld/COFF/DriverUtils.cpp