Author: ted
Date: Mon May 11 16:21:21 2015
New Revision: 237052

URL: http://llvm.org/viewvc/llvm-project?rev=237052&view=rev
Log:
Remove Triple Vendor check when creating Linux Platform

Summary: The Linux Platform shouldn't care about the Vendor field in the 
Triple. Currently it allows a value of "PC", or "unknown" if LLDB was built on 
Linux. This patch removes that check, so the Vendor field isn't touched. This 
will allow the Linux Platform to be created when using a Triple of *-*-Linux.

Reviewers: vharron, clayborg, sas, tberghammer

Reviewed By: clayborg, sas, tberghammer

Subscribers: tberghammer, sas, lldb-commits

Differential Revision: http://reviews.llvm.org/D8742

Modified:
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=237052&r1=237051&r2=237052&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Mon May 11 
16:21:21 2015
@@ -172,44 +172,23 @@ PlatformLinux::CreateInstance (bool forc
     if (create == false && arch && arch->IsValid())
     {
         const llvm::Triple &triple = arch->GetTriple();
-        switch (triple.getVendor())
+        switch (triple.getOS())
         {
-            case llvm::Triple::PC:
+            case llvm::Triple::Linux:
                 create = true;
                 break;
 
 #if defined(__linux__)
-            // Only accept "unknown" for the vendor if the host is linux and
+            // Only accept "unknown" for the OS if the host is linux and
             // it "unknown" wasn't specified (it was just returned because it
-            // was NOT specified_
-            case llvm::Triple::VendorType::UnknownVendor:
-                create = !arch->TripleVendorWasSpecified();
+            // was NOT specified)
+            case llvm::Triple::OSType::UnknownOS:
+                create = !arch->TripleOSWasSpecified();
                 break;
 #endif
             default:
                 break;
         }
-
-        if (create)
-        {
-            switch (triple.getOS())
-            {
-                case llvm::Triple::Linux:
-                    break;
-
-#if defined(__linux__)
-                // Only accept "unknown" for the OS if the host is linux and
-                // it "unknown" wasn't specified (it was just returned because 
it
-                // was NOT specified)
-                case llvm::Triple::OSType::UnknownOS:
-                    create = !arch->TripleOSWasSpecified();
-                    break;
-#endif
-                default:
-                    create = false;
-                    break;
-            }
-        }
     }
 
     if (create)


_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to