Ejemplo n.º 1
0
StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
  if (triple.isOSDarwin())
    return getPlatformNameForDarwin(getDarwinPlatformKind(triple));

  if (triple.isAndroid())
    return "android";

  if (triple.isOSLinux())
    return "linux";

  if (triple.isOSFreeBSD())
    return "freebsd";

  if (triple.isKnownWindowsMSVCEnvironment())
    return  "windows";

  if (triple.isWindowsCygwinEnvironment())
    return  "cygwin";

  if (triple.isWindowsGNUEnvironment())
    return  "mingw";

  return "";
}