forked from OSchip/llvm-project
[lldb/Platform] s/m_name/m_hostname
m_name is confusing, as there is a getter called GetName, but it returns a completely different thing.
This commit is contained in:
parent
29fc5e0245
commit
a53c5c66b3
|
@ -892,7 +892,7 @@ protected:
|
|||
FileSpec m_working_dir; // The working directory which is used when installing
|
||||
// modules that have no install path set
|
||||
std::string m_remote_url;
|
||||
std::string m_name;
|
||||
std::string m_hostname;
|
||||
llvm::VersionTuple m_os_version;
|
||||
ArchSpec
|
||||
m_system_arch; // The architecture of the kernel or the remote platform
|
||||
|
|
|
@ -281,10 +281,10 @@ Status PlatformRemoteGDBServer::DisconnectRemote() {
|
|||
|
||||
const char *PlatformRemoteGDBServer::GetHostname() {
|
||||
if (m_gdb_client_up)
|
||||
m_gdb_client_up->GetHostname(m_name);
|
||||
if (m_name.empty())
|
||||
m_gdb_client_up->GetHostname(m_hostname);
|
||||
if (m_hostname.empty())
|
||||
return nullptr;
|
||||
return m_name.c_str();
|
||||
return m_hostname.c_str();
|
||||
}
|
||||
|
||||
llvm::Optional<std::string>
|
||||
|
|
|
@ -385,10 +385,9 @@ ArchSpec Platform::GetAugmentedArchSpec(Platform *platform, llvm::StringRef trip
|
|||
/// Default Constructor
|
||||
Platform::Platform(bool is_host)
|
||||
: m_is_host(is_host), m_os_version_set_while_connected(false),
|
||||
m_system_arch_set_while_connected(false), m_sdk_sysroot(), m_sdk_build(),
|
||||
m_working_dir(), m_remote_url(), m_name(), m_system_arch(), m_mutex(),
|
||||
m_max_uid_name_len(0), m_max_gid_name_len(0), m_supports_rsync(false),
|
||||
m_rsync_opts(), m_rsync_prefix(), m_supports_ssh(false), m_ssh_opts(),
|
||||
m_system_arch_set_while_connected(false), m_max_uid_name_len(0),
|
||||
m_max_gid_name_len(0), m_supports_rsync(false), m_rsync_opts(),
|
||||
m_rsync_prefix(), m_supports_ssh(false), m_ssh_opts(),
|
||||
m_ignores_remote_hostname(false), m_trap_handlers(),
|
||||
m_calculated_trap_handlers(false),
|
||||
m_module_cache(std::make_unique<ModuleCache>()) {
|
||||
|
@ -793,9 +792,9 @@ const char *Platform::GetHostname() {
|
|||
if (IsHost())
|
||||
return "127.0.0.1";
|
||||
|
||||
if (m_name.empty())
|
||||
if (m_hostname.empty())
|
||||
return nullptr;
|
||||
return m_name.c_str();
|
||||
return m_hostname.c_str();
|
||||
}
|
||||
|
||||
ConstString Platform::GetFullNameForDylib(ConstString basename) {
|
||||
|
|
Loading…
Reference in New Issue