Define the platform ID = 10, and simple mappings between platform ID & name.
Do you want to add something similar to:
@tschuett, I prefer not to do anything that involves semantics for DriverKit, since I don't have any domain knowledge. For that matter, perhaps I shouldn't even follow-through with this diff, which I only embarked upon at your suggestion because the original author of the MachO -platform_version diff (I commandeered it) had a TODO comment. I can code-monkey the TBDv4 testcase via simple substitution, but what about TBDv1 .. TBDv3? IDK, and don't want to spend time determining minimum version# for DriverKit. Do you know that?
A lot of string values in that list miss tests. People with domain knowledge can add the tests separately, I think.
The current TextAPI library is simple reader/writer support and the referenced unit tests reflect any valid inputs to generate tbd and nothing else. IMO adding one TBDv4 test case with just the target info and install name would be good to add. I'd be happy to write the patch for it after this lands if that helps.
DriverKit case should be included
@cishida, a case here depends on first defining DriverKit for enum Triple::OSType in llvm/include/llvm/ADT/Triple.h, which does not yet exist. (Same for BridgeOS according to your comment above). I see that properly supporting these Triple::OSType enums requires knowing minimum OS versions in several contexts, and knowing more about the platforms than I do.
May I commit this diff as-is, without Triple::OSType::DriverKit, and leave that to you?
SGTM! In the revision that lands, could you just include driverkit in the TODO comment?