parent
bfe8bcbc43
commit
d9b368526b
|
@ -34,39 +34,6 @@ public:
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static void Terminate();
|
static void Terminate();
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
/// Returns the number of CPUs on this current host.
|
|
||||||
///
|
|
||||||
/// @return
|
|
||||||
/// Number of CPUs on this current host, or zero if the number
|
|
||||||
/// of CPUs can't be determined on this host.
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
static uint32_t GetNumberCPUS();
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
/// Returns the maximum length of a thread name on this platform.
|
|
||||||
///
|
|
||||||
/// @return
|
|
||||||
/// Maximum length of a thread name on this platform.
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
static uint32_t GetMaxThreadNameLength();
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
/// Gets the host vendor string.
|
|
||||||
///
|
|
||||||
/// @return
|
|
||||||
/// A const string object containing the host vendor name.
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
static llvm::StringRef GetVendorString();
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
/// Gets the host Operating System (OS) string.
|
|
||||||
///
|
|
||||||
/// @return
|
|
||||||
/// A const string object containing the host OS name.
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
static llvm::StringRef GetOSString();
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
/// Gets the host target triple as a const string.
|
/// Gets the host target triple as a const string.
|
||||||
///
|
///
|
||||||
|
|
|
@ -17,7 +17,6 @@ namespace lldb_private {
|
||||||
|
|
||||||
class HostInfoFreeBSD : public HostInfoPosix {
|
class HostInfoFreeBSD : public HostInfoPosix {
|
||||||
public:
|
public:
|
||||||
static uint32_t GetMaxThreadNameLength();
|
|
||||||
static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
|
static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
|
||||||
static bool GetOSBuildString(std::string &s);
|
static bool GetOSBuildString(std::string &s);
|
||||||
static bool GetOSKernelDescription(std::string &s);
|
static bool GetOSKernelDescription(std::string &s);
|
||||||
|
|
|
@ -29,7 +29,6 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
static uint32_t GetMaxThreadNameLength();
|
|
||||||
|
|
||||||
static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
|
static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
|
||||||
static bool GetOSBuildString(std::string &s);
|
static bool GetOSBuildString(std::string &s);
|
||||||
|
|
|
@ -30,7 +30,6 @@ public:
|
||||||
static bool GetOSBuildString(std::string &s);
|
static bool GetOSBuildString(std::string &s);
|
||||||
static bool GetOSKernelDescription(std::string &s);
|
static bool GetOSKernelDescription(std::string &s);
|
||||||
static FileSpec GetProgramFileSpec();
|
static FileSpec GetProgramFileSpec();
|
||||||
static uint32_t GetMaxThreadNameLength();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static bool ComputeSupportExeDirectory(FileSpec &file_spec);
|
static bool ComputeSupportExeDirectory(FileSpec &file_spec);
|
||||||
|
|
|
@ -17,7 +17,6 @@ namespace lldb_private {
|
||||||
|
|
||||||
class HostInfoNetBSD : public HostInfoPosix {
|
class HostInfoNetBSD : public HostInfoPosix {
|
||||||
public:
|
public:
|
||||||
static uint32_t GetMaxThreadNameLength();
|
|
||||||
static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
|
static bool GetOSVersion(uint32_t &major, uint32_t &minor, uint32_t &update);
|
||||||
static bool GetOSBuildString(std::string &s);
|
static bool GetOSBuildString(std::string &s);
|
||||||
static bool GetOSKernelDescription(std::string &s);
|
static bool GetOSKernelDescription(std::string &s);
|
||||||
|
|
|
@ -50,9 +50,6 @@ struct HostInfoBaseFields {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t m_number_cpus;
|
|
||||||
std::string m_vendor_string;
|
|
||||||
std::string m_os_string;
|
|
||||||
std::string m_host_triple;
|
std::string m_host_triple;
|
||||||
|
|
||||||
ArchSpec m_host_arch_32;
|
ArchSpec m_host_arch_32;
|
||||||
|
@ -79,34 +76,6 @@ void HostInfoBase::Terminate() {
|
||||||
g_fields = nullptr;
|
g_fields = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t HostInfoBase::GetNumberCPUS() {
|
|
||||||
static llvm::once_flag g_once_flag;
|
|
||||||
llvm::call_once(g_once_flag, []() {
|
|
||||||
g_fields->m_number_cpus = std::thread::hardware_concurrency();
|
|
||||||
});
|
|
||||||
return g_fields->m_number_cpus;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t HostInfoBase::GetMaxThreadNameLength() { return 0; }
|
|
||||||
|
|
||||||
llvm::StringRef HostInfoBase::GetVendorString() {
|
|
||||||
static llvm::once_flag g_once_flag;
|
|
||||||
llvm::call_once(g_once_flag, []() {
|
|
||||||
g_fields->m_vendor_string =
|
|
||||||
HostInfo::GetArchitecture().GetTriple().getVendorName().str();
|
|
||||||
});
|
|
||||||
return g_fields->m_vendor_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
llvm::StringRef HostInfoBase::GetOSString() {
|
|
||||||
static llvm::once_flag g_once_flag;
|
|
||||||
llvm::call_once(g_once_flag, []() {
|
|
||||||
g_fields->m_os_string =
|
|
||||||
std::move(HostInfo::GetArchitecture().GetTriple().getOSName());
|
|
||||||
});
|
|
||||||
return g_fields->m_os_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
llvm::StringRef HostInfoBase::GetTargetTriple() {
|
llvm::StringRef HostInfoBase::GetTargetTriple() {
|
||||||
static llvm::once_flag g_once_flag;
|
static llvm::once_flag g_once_flag;
|
||||||
llvm::call_once(g_once_flag, []() {
|
llvm::call_once(g_once_flag, []() {
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
using namespace lldb_private;
|
using namespace lldb_private;
|
||||||
|
|
||||||
uint32_t HostInfoFreeBSD::GetMaxThreadNameLength() { return 16; }
|
|
||||||
|
|
||||||
bool HostInfoFreeBSD::GetOSVersion(uint32_t &major, uint32_t &minor,
|
bool HostInfoFreeBSD::GetOSVersion(uint32_t &major, uint32_t &minor,
|
||||||
uint32_t &update) {
|
uint32_t &update) {
|
||||||
struct utsname un;
|
struct utsname un;
|
||||||
|
|
|
@ -41,8 +41,6 @@ void HostInfoLinux::Initialize() {
|
||||||
g_fields = new HostInfoLinuxFields();
|
g_fields = new HostInfoLinuxFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t HostInfoLinux::GetMaxThreadNameLength() { return 16; }
|
|
||||||
|
|
||||||
bool HostInfoLinux::GetOSVersion(uint32_t &major, uint32_t &minor,
|
bool HostInfoLinux::GetOSVersion(uint32_t &major, uint32_t &minor,
|
||||||
uint32_t &update) {
|
uint32_t &update) {
|
||||||
static bool success = false;
|
static bool success = false;
|
||||||
|
|
|
@ -335,5 +335,3 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t HostInfoMacOSX::GetMaxThreadNameLength() { return 64; }
|
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
|
|
||||||
using namespace lldb_private;
|
using namespace lldb_private;
|
||||||
|
|
||||||
uint32_t HostInfoNetBSD::GetMaxThreadNameLength() {
|
|
||||||
return PTHREAD_MAX_NAMELEN_NP;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HostInfoNetBSD::GetOSVersion(uint32_t &major, uint32_t &minor,
|
bool HostInfoNetBSD::GetOSVersion(uint32_t &major, uint32_t &minor,
|
||||||
uint32_t &update) {
|
uint32_t &update) {
|
||||||
struct utsname un;
|
struct utsname un;
|
||||||
|
|
Loading…
Reference in New Issue