diff options
Diffstat (limited to 'lib/Support/Triple.cpp')
| -rw-r--r-- | lib/Support/Triple.cpp | 22 | 
1 files changed, 12 insertions, 10 deletions
| diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 4f0a30042b76..b14d6492b1ed 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -168,6 +168,7 @@ StringRef Triple::getVendorTypeName(VendorType Kind) {    case AMD: return "amd";    case Mesa: return "mesa";    case SUSE: return "suse"; +  case OpenEmbedded: return "oe";    }    llvm_unreachable("Invalid VendorType!"); @@ -232,9 +233,7 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) {    case MSVC: return "msvc";    case Itanium: return "itanium";    case Cygnus: return "cygnus"; -  case AMDOpenCL: return "amdopencl";    case CoreCLR: return "coreclr"; -  case OpenCL: return "opencl";    case Simulator: return "simulator";    } @@ -384,7 +383,7 @@ static Triple::ArchType parseArch(StringRef ArchName) {      // FIXME: Do we need to support these?      .Cases("i786", "i886", "i986", Triple::x86)      .Cases("amd64", "x86_64", "x86_64h", Triple::x86_64) -    .Cases("powerpc", "ppc32", Triple::ppc) +    .Cases("powerpc", "ppc", "ppc32", Triple::ppc)      .Cases("powerpc64", "ppu", "ppc64", Triple::ppc64)      .Cases("powerpc64le", "ppc64le", Triple::ppc64le)      .Case("xscale", Triple::arm) @@ -465,6 +464,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {      .Case("amd", Triple::AMD)      .Case("mesa", Triple::Mesa)      .Case("suse", Triple::SUSE) +    .Case("oe", Triple::OpenEmbedded)      .Default(Triple::UnknownVendor);  } @@ -523,9 +523,7 @@ static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {      .StartsWith("msvc", Triple::MSVC)      .StartsWith("itanium", Triple::Itanium)      .StartsWith("cygnus", Triple::Cygnus) -    .StartsWith("amdopencl", Triple::AMDOpenCL)      .StartsWith("coreclr", Triple::CoreCLR) -    .StartsWith("opencl", Triple::OpenCL)      .StartsWith("simulator", Triple::Simulator)      .Default(Triple::UnknownEnvironment);  } @@ -594,6 +592,8 @@ static Triple::SubArchType parseSubArch(StringRef SubArchName) {      return Triple::ARMSubArch_v8_2a;    case ARM::ArchKind::ARMV8_3A:      return Triple::ARMSubArch_v8_3a; +  case ARM::ArchKind::ARMV8_4A: +    return Triple::ARMSubArch_v8_4a;    case ARM::ArchKind::ARMV8R:      return Triple::ARMSubArch_v8r;    case ARM::ArchKind::ARMV8MBaseline: @@ -670,8 +670,6 @@ static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {    case Triple::tce:    case Triple::tcele:    case Triple::thumbeb: -  case Triple::wasm32: -  case Triple::wasm64:    case Triple::xcore:      return Triple::ELF; @@ -680,11 +678,15 @@ static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {      if (T.isOSDarwin())        return Triple::MachO;      return Triple::ELF; + +  case Triple::wasm32: +  case Triple::wasm64: +    return Triple::Wasm;    }    llvm_unreachable("unknown architecture");  } -/// \brief Construct a triple from the string representation provided. +/// Construct a triple from the string representation provided.  ///  /// This stores the string representation and parses the various pieces into  /// enum members. @@ -713,7 +715,7 @@ Triple::Triple(const Twine &Str)      ObjectFormat = getDefaultFormat(*this);  } -/// \brief Construct a triple from string representations of the architecture, +/// Construct a triple from string representations of the architecture,  /// vendor, and OS.  ///  /// This joins each argument into a canonical string representation and parses @@ -729,7 +731,7 @@ Triple::Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr)    ObjectFormat = getDefaultFormat(*this);  } -/// \brief Construct a triple from string representations of the architecture, +/// Construct a triple from string representations of the architecture,  /// vendor, OS, and environment.  ///  /// This joins each argument into a canonical string representation and parses | 
