Clear the output string passed to GetHostName()
authorAaron Smith <aaron.smith@microsoft.com>
Wed, 17 Apr 2019 03:13:06 +0000 (03:13 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Wed, 17 Apr 2019 03:13:06 +0000 (03:13 +0000)
commitb8ec7eee8118d8d5f64370e4619a746ceaf7d6c1
tree139fda05cee1ee3b490c82ac42271d3ad5530c8b
parent990514cec829d3027bc3472427bc3457d742d2e9
Clear the output string passed to GetHostName()

LLVM's wchar to UTF8 conversion routine expects an empty string to store the output.
GetHostName() on Windows is sometimes called with a non-empty string which triggers
an assert. The simple fix is to clear the output string before the conversion.

llvm-svn: 358550
lldb/source/Host/windows/HostInfoWindows.cpp
lldb/unittests/Host/HostInfoTest.cpp