Return a StringRef from getHostCPUName.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 12 Dec 2013 15:45:32 +0000 (15:45 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 12 Dec 2013 15:45:32 +0000 (15:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197158 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Host.h
lib/Support/Host.cpp

index 28c4cc790fe501cdbb181813900d85e0352e7efa..8f4bf3c1ba56d87a0e9d14446411af7108b268c4 100644 (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
index b423ada6fa1c461fe80970189820ded5ea448392..d883c05887283c6e29970e56ecb8074558f0abc3 100644 (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";