Add more arguments to SocketAddress::GetAddressInfo
authorPavel Labath <labath@google.com>
Mon, 24 Apr 2017 09:39:56 +0000 (09:39 +0000)
committerPavel Labath <labath@google.com>
Mon, 24 Apr 2017 09:39:56 +0000 (09:39 +0000)
commitdf0497c4aaabd119d5d835bce6339be8fed58602
treed6be44a63b0a0973d0e667f3292311ff6f161569
parenta301498783dd9c05f1067cdb8eea5ff4e9f9a059
Add more arguments to SocketAddress::GetAddressInfo

Summary:
the reason for this is two-fold:
- getaddrinfo without the extra arguments will return the same
(network-level) address multiple times, once for each supported
transport protocol, which is not what is usually intended (it certainly
wasn't in D31823)
- it enables us to rewrite the getaddrinfo member function in terms of
the static GetAddressInfo function.

Reviewers: beanz, tberghammer

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D32357

llvm-svn: 301168
lldb/include/lldb/Host/SocketAddress.h
lldb/source/Host/common/SocketAddress.cpp
lldb/unittests/Host/SocketAddressTest.cpp