message: Retrieve the availability platform names from the compiler instead of
  hardcoding them. (NFC)
  rdar://problem/49659039
diff: #include "llvm/ADT/StringRef.h"
  #include "clang/Basic/CharInfo.h"
  +#include "swift/AST/PlatformKind.h"
  +#include "swift/Basic/LangOptions.h"
  #include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h"
  #include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
  @@ -270,15 +272,10 @@ bool ExpressionSourceCode::SaveExpressionTextToTempFile(
  }
  /// Format the OS name the way that Swift availability attributes do.
  -static llvm::StringRef getAvailabilityName(llvm::Triple::OSType os) {
  - switch (os) {
  - case llvm::Triple::MacOSX: return "macOS";
  - case llvm::Triple::IOS: return "iOS";
  - case llvm::Triple::TvOS: return "tvOS";
  - case llvm::Triple::WatchOS: return "watchOS";
  - default:
  - return llvm::Triple::getOSTypeName(os);
  - }
  +static llvm::StringRef getAvailabilityName(const llvm::Triple &triple) {
  + swift::LangOptions lang_options;
  + lang_options.setTarget(triple);
  + return swift::platformString(swift::targetPlatform(lang_options));
  }
  bool ExpressionSourceCode::GetText(
  @@ -480,7 +477,7 @@ bool ExpressionSourceCode::GetText(
  auto triple = arch_spec.GetTriple();
  if (triple.isOSDarwin()) {
  if (auto process_sp = exe_ctx.GetProcessSP()) {
  - os_vers << getAvailabilityName(triple.getOS()) << " ";
  + os_vers << getAvailabilityName(triple) << " ";
  auto platform = target->GetPlatform();
  bool is_simulator =
  platform->GetPluginName().GetStringRef().endswith("-simulator");
  