diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-02-13 01:56:21 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-02-13 01:56:21 +0000 |
commit | e31b74e98b428205fcba17736b438a60c8be336c (patch) | |
tree | 1b909c252a3ea7a28214b674a70e391cf2493bf0 /lib/Support/Triple.cpp | |
parent | be38c614128fb8e3455b701fbfa2dbe79321f05d (diff) |
Add AMDGPU related triple vendors/OSes
As support expands to more runtimes, we'll need to
distinguish between more than just HSA and unknown.
This also lets us stop using unknown everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r-- | lib/Support/Triple.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp index 12aa7bfa0ce..1967fac2600 100644 --- a/lib/Support/Triple.cpp +++ b/lib/Support/Triple.cpp @@ -150,6 +150,8 @@ const char *Triple::getVendorTypeName(VendorType Kind) { case NVIDIA: return "nvidia"; case CSR: return "csr"; case Myriad: return "myriad"; + case AMD: return "amd"; + case Mesa: return "mesa"; } llvm_unreachable("Invalid VendorType!"); @@ -186,6 +188,7 @@ const char *Triple::getOSTypeName(OSType Kind) { case ELFIAMCU: return "elfiamcu"; case TvOS: return "tvos"; case WatchOS: return "watchos"; + case Mesa3D: return "mesa3d"; } llvm_unreachable("Invalid OSType"); @@ -412,6 +415,8 @@ static Triple::VendorType parseVendor(StringRef VendorName) { .Case("nvidia", Triple::NVIDIA) .Case("csr", Triple::CSR) .Case("myriad", Triple::Myriad) + .Case("amd", Triple::AMD) + .Case("mesa", Triple::Mesa) .Default(Triple::UnknownVendor); } @@ -445,6 +450,7 @@ static Triple::OSType parseOS(StringRef OSName) { .StartsWith("elfiamcu", Triple::ELFIAMCU) .StartsWith("tvos", Triple::TvOS) .StartsWith("watchos", Triple::WatchOS) + .StartsWith("mesa3d", Triple::Mesa3D) .Default(Triple::UnknownOS); } |