diff options
| -rw-r--r-- | lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp index dd2ecfc859c..5c47fedbf97 100644 --- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@ -45,45 +45,23 @@ PlatformFreeBSD::CreateInstance (bool force, const lldb_private::ArchSpec *arch) 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)); |

