Define the platform ID = 10, and simple mappings between platform ID & name.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Do you want to add something similar to:
https://github.com/llvm/llvm-project/blob/master/llvm/unittests/TextAPI/TextStubV4Tests.cpp#L593
for DriverKit?
@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.
llvm/lib/TextAPI/MachO/Platform.cpp | ||
---|---|---|
52 | DriverKit case should be included |
llvm/unittests/TextAPI/TextStubV4Tests.cpp | ||
---|---|---|
761–784 ↗ | (On Diff #285539) | Looks good, thanks! |
llvm/lib/TextAPI/MachO/Platform.cpp | ||
---|---|---|
52 | @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? |
llvm/lib/TextAPI/MachO/Platform.cpp | ||
---|---|---|
52 | SGTM! In the revision that lands, could you just include driverkit in the TODO comment? |
Add a trailing comma so that the next update can be easier.