summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-12 16:10:48 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-12 16:10:48 +0000
commit1f58e4dc11e2165efc243798106add026603fee8 (patch)
tree4a5ff1936bbf000f8e2917e912e150773f44659a /llvm/lib/Support
parent9955dbca2fba6c7749d96a6613f2762683ae7841 (diff)
downloadbcm5719-llvm-1f58e4dc11e2165efc243798106add026603fee8.tar.gz
bcm5719-llvm-1f58e4dc11e2165efc243798106add026603fee8.zip
Convert the other getHostByName implementations to StringRef.
llvm-svn: 197166
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Host.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp
index d883c058872..c9140cb1bc6 100644
--- a/llvm/lib/Support/Host.cpp
+++ b/llvm/lib/Support/Host.cpp
@@ -449,7 +449,7 @@ StringRef sys::getHostCPUName() {
return "generic";
}
#elif defined(__APPLE__) && (defined(__ppc__) || defined(__powerpc__))
-std::string sys::getHostCPUName() {
+StringRef sys::getHostCPUName() {
host_basic_info_data_t hostInfo;
mach_msg_type_number_t infoCount;
@@ -478,7 +478,7 @@ std::string sys::getHostCPUName() {
return "generic";
}
#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,
// 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.
@@ -568,7 +568,7 @@ std::string sys::getHostCPUName() {
.Default(generic);
}
#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,
// it is exposed through the /proc/cpuinfo file.
// Note: We cannot mmap /proc/cpuinfo here and then process the resulting
@@ -623,7 +623,7 @@ std::string sys::getHostCPUName() {
return "generic";
}
#elif defined(__linux__) && defined(__s390x__)
-std::string sys::getHostCPUName() {
+StringRef sys::getHostCPUName() {
// STIDP is a privileged operation, so use /proc/cpuinfo instead.
// 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
@@ -665,7 +665,7 @@ std::string sys::getHostCPUName() {
return "generic";
}
#else
-std::string sys::getHostCPUName() {
+StringRef sys::getHostCPUName() {
return "generic";
}
#endif
OpenPOWER on IntegriCloud