mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 02:29:22 +00:00
Convert the other getHostByName implementations to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197166 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
11b11d77ee
commit
e60ffe35a2
@ -449,7 +449,7 @@ StringRef sys::getHostCPUName() {
|
|||||||
return "generic";
|
return "generic";
|
||||||
}
|
}
|
||||||
#elif defined(__APPLE__) && (defined(__ppc__) || defined(__powerpc__))
|
#elif defined(__APPLE__) && (defined(__ppc__) || defined(__powerpc__))
|
||||||
std::string sys::getHostCPUName() {
|
StringRef sys::getHostCPUName() {
|
||||||
host_basic_info_data_t hostInfo;
|
host_basic_info_data_t hostInfo;
|
||||||
mach_msg_type_number_t infoCount;
|
mach_msg_type_number_t infoCount;
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ std::string sys::getHostCPUName() {
|
|||||||
return "generic";
|
return "generic";
|
||||||
}
|
}
|
||||||
#elif defined(__linux__) && (defined(__ppc__) || defined(__powerpc__))
|
#elif defined(__linux__) && (defined(__ppc__) || defined(__powerpc__))
|
||||||
std::string sys::getHostCPUName() {
|
SringRef sys::getHostCPUName() {
|
||||||
// Access to the Processor Version Register (PVR) on PowerPC is privileged,
|
// Access to the Processor Version Register (PVR) on PowerPC is privileged,
|
||||||
// and so we must use an operating-system interface to determine the current
|
// and so we must use an operating-system interface to determine the current
|
||||||
// processor type. On Linux, this is exposed through the /proc/cpuinfo file.
|
// processor type. On Linux, this is exposed through the /proc/cpuinfo file.
|
||||||
@ -568,7 +568,7 @@ std::string sys::getHostCPUName() {
|
|||||||
.Default(generic);
|
.Default(generic);
|
||||||
}
|
}
|
||||||
#elif defined(__linux__) && defined(__arm__)
|
#elif defined(__linux__) && defined(__arm__)
|
||||||
std::string sys::getHostCPUName() {
|
StringRef sys::getHostCPUName() {
|
||||||
// The cpuid register on arm is not accessible from user space. On Linux,
|
// The cpuid register on arm is not accessible from user space. On Linux,
|
||||||
// it is exposed through the /proc/cpuinfo file.
|
// it is exposed through the /proc/cpuinfo file.
|
||||||
// Note: We cannot mmap /proc/cpuinfo here and then process the resulting
|
// Note: We cannot mmap /proc/cpuinfo here and then process the resulting
|
||||||
@ -623,7 +623,7 @@ std::string sys::getHostCPUName() {
|
|||||||
return "generic";
|
return "generic";
|
||||||
}
|
}
|
||||||
#elif defined(__linux__) && defined(__s390x__)
|
#elif defined(__linux__) && defined(__s390x__)
|
||||||
std::string sys::getHostCPUName() {
|
StringRef sys::getHostCPUName() {
|
||||||
// STIDP is a privileged operation, so use /proc/cpuinfo instead.
|
// STIDP is a privileged operation, so use /proc/cpuinfo instead.
|
||||||
// Note: We cannot mmap /proc/cpuinfo here and then process the resulting
|
// Note: We cannot mmap /proc/cpuinfo here and then process the resulting
|
||||||
// memory buffer because the 'file' has 0 size (it can be read from only
|
// memory buffer because the 'file' has 0 size (it can be read from only
|
||||||
@ -665,7 +665,7 @@ std::string sys::getHostCPUName() {
|
|||||||
return "generic";
|
return "generic";
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
std::string sys::getHostCPUName() {
|
StringRef sys::getHostCPUName() {
|
||||||
return "generic";
|
return "generic";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user