diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp --- a/lldb/source/Utility/ArchSpec.cpp +++ b/lldb/source/Utility/ArchSpec.cpp @@ -1396,23 +1396,18 @@ } bool ArchSpec::IsFullySpecifiedTriple() const { - const auto &user_specified_triple = GetTriple(); - - bool user_triple_fully_specified = false; - - if ((user_specified_triple.getOS() != llvm::Triple::UnknownOS) || - TripleOSWasSpecified()) { - if ((user_specified_triple.getVendor() != llvm::Triple::UnknownVendor) || - TripleVendorWasSpecified()) { - const unsigned unspecified = 0; - if (!user_specified_triple.isOSDarwin() || - user_specified_triple.getOSMajorVersion() != unspecified) { - user_triple_fully_specified = true; - } - } - } + if (!TripleOSWasSpecified()) + return false; + + if (!TripleVendorWasSpecified()) + return false; - return user_triple_fully_specified; + const unsigned unspecified = 0; + const llvm::Triple &triple = GetTriple(); + if (triple.isOSDarwin() && triple.getOSMajorVersion() == unspecified) + return false; + + return true; } void ArchSpec::PiecewiseTripleCompare(