diff options
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/TargetParser.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/Triple.cpp | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp index 7a870775ee4..b6cb19890c2 100644 --- a/llvm/lib/Support/TargetParser.cpp +++ b/llvm/lib/Support/TargetParser.cpp @@ -520,6 +520,7 @@ unsigned llvm::ARM::parseArchProfile(StringRef Arch) { return ARM::PK_R; case ARM::AK_ARMV7: case ARM::AK_ARMV7A: + case ARM::AK_ARMV7K: case ARM::AK_ARMV7L: case ARM::AK_ARMV8A: case ARM::AK_ARMV8_1A: diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index 142a9b9e200..8964fc09985 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -182,6 +182,8 @@ const char *Triple::getOSTypeName(OSType Kind) { case AMDHSA: return "amdhsa"; case PS4: return "ps4"; case ELFIAMCU: return "elfiamcu"; + case TvOS: return "tvos"; + case WatchOS: return "watchos"; } llvm_unreachable("Invalid OSType"); @@ -437,6 +439,8 @@ static Triple::OSType parseOS(StringRef OSName) { .StartsWith("amdhsa", Triple::AMDHSA) .StartsWith("ps4", Triple::PS4) .StartsWith("elfiamcu", Triple::ELFIAMCU) + .StartsWith("tvos", Triple::TvOS) + .StartsWith("watchos", Triple::WatchOS) .Default(Triple::UnknownOS); } @@ -512,6 +516,8 @@ static Triple::SubArchType parseSubArch(StringRef SubArchName) { case ARM::AK_ARMV7L: case ARM::AK_ARMV7HL: return Triple::ARMSubArch_v7; + case ARM::AK_ARMV7K: + return Triple::ARMSubArch_v7k; case ARM::AK_ARMV7M: return Triple::ARMSubArch_v7m; case ARM::AK_ARMV7S: @@ -932,6 +938,8 @@ bool Triple::getMacOSXVersion(unsigned &Major, unsigned &Minor, return false; break; case IOS: + case TvOS: + case WatchOS: // Ignore the version from the triple. This is only handled because the // the clang driver combines OS X and IOS support into a common Darwin // toolchain that wants to know the OS X version number even when targeting @@ -950,6 +958,7 @@ void Triple::getiOSVersion(unsigned &Major, unsigned &Minor, default: llvm_unreachable("unexpected OS for Darwin triple"); case Darwin: case MacOSX: + case WatchOS: // Ignore the version from the triple. This is only handled because the // the clang driver combines OS X and IOS support into a common Darwin // toolchain that wants to know the iOS version number even when targeting @@ -959,6 +968,7 @@ void Triple::getiOSVersion(unsigned &Major, unsigned &Minor, Micro = 0; break; case IOS: + case TvOS: getOSVersion(Major, Minor, Micro); // Default to 5.0 (or 7.0 for arm64). if (Major == 0) |