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 | 5e845e54f59930b86c1aca689345bcbaf4311c95 (patch) | |
tree | 25183f3d2a56446b833d610d1ba963e3fe723b2a /llvm/lib/Support | |
parent | ef34c99af8da8fdafcb5c7e8ec824549a49da07b (diff) | |
download | bcm5719-llvm-5e845e54f59930b86c1aca689345bcbaf4311c95.tar.gz bcm5719-llvm-5e845e54f59930b86c1aca689345bcbaf4311c95.zip |
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.
llvm-svn: 260790
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/Triple.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index 12aa7bfa0ce..1967fac2600 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/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); } |