Return a StringRef from getHostCPUName.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-12-12 15:45:32 +00:00
parent 8a513abbc8
commit 9191be9523
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -193,7 +193,7 @@ static void DetectX86FamilyModel(unsigned EAX, unsigned &Family,
}
}
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";