[Lldb-commits] [PATCH] D122912: Simplify ArchSpec::IsFullySpecifiedTriple() (NFC)
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 1 14:16:57 PDT 2022
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG942c21ed23dc: Simplify ArchSpec::IsFullySpecifiedTriple() (NFC) (authored by aprantl).
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122912/new/
https://reviews.llvm.org/D122912
Files:
lldb/source/Utility/ArchSpec.cpp
Index: lldb/source/Utility/ArchSpec.cpp
===================================================================
--- lldb/source/Utility/ArchSpec.cpp
+++ 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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122912.419860.patch
Type: text/x-patch
Size: 1191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220401/f608b5b4/attachment.bin>
More information about the lldb-commits
mailing list