Add swift::getNonSimulatorPlatform for DarwinPlatformKind

And use it in getDarwinLibraryNameSuffixForTriple, making the logic
there clearer.

Suggested by David U!
This commit is contained in:
Jordan Rose
2018-07-11 15:08:10 -07:00
parent d4668833e0
commit d11704bcc9
3 changed files with 31 additions and 13 deletions

View File

@@ -58,6 +58,11 @@ namespace swift {
/// Returns the platform Kind for Darwin triples.
DarwinPlatformKind getDarwinPlatformKind(const llvm::Triple &triple);
/// Maps an arbitrary platform to its non-simulator equivalent.
///
/// If \p platform is not a simulator platform, it will be returned as is.
DarwinPlatformKind getNonSimulatorPlatform(DarwinPlatformKind platform);
/// Returns the architecture component of the path for a given target triple.
///
/// Typically this is used for mapping the architecture component of the