Page MenuHomePhabricator

Add an API to construct an XcodeSDK from an SDK type.

Authored by aprantl on Thu, May 7, 3:02 PM.



Unfortunately I discovered that I do need to be able to go full round-trip in swift-lldb.

Also, this moves numSDKs out of the actual enum, as to not mess with the switch-cases-covered warning.

Diff Detail

Event Timeline

aprantl created this revision.Thu, May 7, 3:02 PM
vsk added inline comments.Thu, May 7, 4:40 PM

I'd expect -Wcovered-switch to break the build if a new case gets added and this list isn't updated. Wdyt of dropping numSDKTypes and using an llvm_unreachable here instead?

aprantl updated this revision to Diff 262883.Fri, May 8, 8:46 AM

Remove redundant static_assert. It was only needed in the other function because that one used cascading ifs.

aprantl updated this revision to Diff 262884.Fri, May 8, 8:47 AM

(Upload the full patch)

JDevlieghere accepted this revision.Fri, May 8, 10:44 AM
JDevlieghere added inline comments.

Cool :P

This revision is now accepted and ready to land.Fri, May 8, 10:44 AM
vsk accepted this revision.Fri, May 8, 10:45 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFri, May 8, 11:15 AM