[llvm] r197158 - Return a StringRef from getHostCPUName.
Rafael Espindola
rafael.espindola at gmail.com
Thu Dec 12 07:45:32 PST 2013
Author: rafael
Date: Thu Dec 12 09:45:32 2013
New Revision: 197158
URL: http://llvm.org/viewvc/llvm-project?rev=197158&view=rev
Log:
Return a StringRef from getHostCPUName.
Modified:
llvm/trunk/include/llvm/Support/Host.h
llvm/trunk/lib/Support/Host.cpp
Modified: llvm/trunk/include/llvm/Support/Host.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Host.h?rev=197158&r1=197157&r2=197158&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Host.h (original)
+++ llvm/trunk/include/llvm/Support/Host.h Thu Dec 12 09:45:32 2013
@@ -55,7 +55,7 @@ namespace sys {
/// target which matches the host.
///
/// \return - The host CPU name, or empty if the CPU could not be determined.
- std::string getHostCPUName();
+ StringRef getHostCPUName();
/// getHostCPUFeatures - Get the LLVM names for the host CPU features.
/// The particular format of the names are target dependent, and suitable for
Modified: llvm/trunk/lib/Support/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=197158&r1=197157&r2=197158&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Host.cpp (original)
+++ llvm/trunk/lib/Support/Host.cpp Thu Dec 12 09:45:32 2013
@@ -193,7 +193,7 @@ static void DetectX86FamilyModel(unsigne
}
}
-std::string sys::getHostCPUName() {
+StringRef sys::getHostCPUName() {
unsigned EAX = 0, EBX = 0, ECX = 0, EDX = 0;
if (GetX86CpuIDAndInfo(0x1, &EAX, &EBX, &ECX, &EDX))
return "generic";
More information about the llvm-commits
mailing list