[Lldb-commits] [lldb] r237075 - Remove Triple Vendor check when creating FreeBSD Platform
Ed Maste
emaste at freebsd.org
Mon May 11 17:43:47 PDT 2015
Author: emaste
Date: Mon May 11 19:43:45 2015
New Revision: 237075
URL: http://llvm.org/viewvc/llvm-project?rev=237075&view=rev
Log:
Remove Triple Vendor check when creating FreeBSD Platform
This is equivalent to r237052 in PlatformLinux.cpp.
Modified:
lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=237075&r1=237074&r2=237075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Mon May 11 19:43:45 2015
@@ -45,45 +45,23 @@ PlatformFreeBSD::CreateInstance (bool fo
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::FreeBSD:
create = true;
break;
#if defined(__FreeBSD__) || defined(__OpenBSD__)
- // Only accept "unknown" for the vendor if the host is BSD and
+ // Only accept "unknown" for the OS if the host is BSD and
// it "unknown" wasn't specified (it was just returned because it
// was NOT specified)
- case llvm::Triple::UnknownArch:
- create = !arch->TripleVendorWasSpecified();
+ case llvm::Triple::OSType::UnknownOS:
+ create = !arch->TripleOSWasSpecified();
break;
#endif
default:
break;
}
-
- if (create)
- {
- switch (triple.getOS())
- {
- case llvm::Triple::FreeBSD:
- case llvm::Triple::KFreeBSD:
- break;
-
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
- // Only accept "unknown" for the OS if the host is BSD and
- // it "unknown" wasn't specified (it was just returned because it
- // was NOT specified)
- case llvm::Triple::UnknownOS:
- create = arch->TripleOSWasSpecified();
- break;
-#endif
- default:
- create = false;
- break;
- }
- }
}
if (create)
return PlatformSP(new PlatformFreeBSD (is_host));
More information about the lldb-commits
mailing list