[Lldb-commits] [PATCH] D58653: [Utility] Allow the value 'unknown' when checking if triple components are unknown

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 26 07:16:22 PST 2019

clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

I seem to remember that we currently expect that there are two cases when it comes to unknowns:

- specified unknowns
- unspecific unknowns

A "specified unknown" is when the user actually typed "unknown" in their triple. IIRC there is no "none" to specify that there is no OS, so we use "specified unknowns" for this case. In this case we expect the enum _and_ the string accessor value for vendor and/or OS to be the string "unknown".

"unspecified unkowns" is when the user just types "arrmv7" as the triple. We need to know they didn't specify anything for vendor and OS. In this case the enums return unknown, but the string accessor return values are empty.

So we can't really change this code unless we add a "none" enum and string value to the LLVM triple system so we can tell the difference. Right now we rely on the above mechanism in a lot of places around the code.



More information about the lldb-commits mailing list