[Lldb-commits] [lldb] r165805 - /lldb/trunk/source/Host/common/Host.cpp

Greg Clayton gclayton at apple.com
Fri Oct 12 09:15:29 PDT 2012


Author: gclayton
Date: Fri Oct 12 11:15:28 2012
New Revision: 165805

URL: http://llvm.org/viewvc/llvm-project?rev=165805&view=rev
Log:
Patch from Andrew Kaylor that centralized where the info for:

ConstString Host::GetVendorString();
ConstString Host::GetOSString();

comes from. It now all comes from the Host::GetArchitecture (eSystemDefaultArchitecture) like the Apple build was doing to minimize the number of places that need to be updated when Host::GetArchitecture () is called.


Modified:
    lldb/trunk/source/Host/common/Host.cpp

Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=165805&r1=165804&r2=165805&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Fri Oct 12 11:15:28 2012
@@ -382,15 +382,9 @@
     static ConstString g_vendor;
     if (!g_vendor)
     {
-#if defined (__APPLE__)
         const ArchSpec &host_arch = GetArchitecture (eSystemDefaultArchitecture);
         const llvm::StringRef &str_ref = host_arch.GetTriple().getVendorName();
         g_vendor.SetCStringWithLength(str_ref.data(), str_ref.size());
-#elif defined (__linux__)
-        g_vendor.SetCString("gnu");
-#elif defined (__FreeBSD__)
-        g_vendor.SetCString("freebsd");
-#endif
     }
     return g_vendor;
 }
@@ -401,15 +395,9 @@
     static ConstString g_os_string;
     if (!g_os_string)
     {
-#if defined (__APPLE__)
         const ArchSpec &host_arch = GetArchitecture (eSystemDefaultArchitecture);
         const llvm::StringRef &str_ref = host_arch.GetTriple().getOSName();
         g_os_string.SetCStringWithLength(str_ref.data(), str_ref.size());
-#elif defined (__linux__)
-        g_os_string.SetCString("linux");
-#elif defined (__FreeBSD__)
-        g_os_string.SetCString("freebsd");
-#endif
     }
     return g_os_string;
 }





More information about the lldb-commits mailing list