File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,8 @@ class Triple {
141
141
AIX,
142
142
CUDA, // NVIDIA CUDA
143
143
NVCL, // NVIDIA OpenCL
144
- AMDHSA // AMD HSA Runtime
144
+ AMDHSA, // AMD HSA Runtime
145
+ PS4
145
146
};
146
147
enum EnvironmentType {
147
148
UnknownEnvironment,
@@ -455,6 +456,19 @@ class Triple {
455
456
return getObjectFormat () == Triple::MachO;
456
457
}
457
458
459
+ // / \brief Tests whether the target is the PS4 CPU
460
+ bool isPS4CPU () const {
461
+ return getArch () == Triple::x86_64 &&
462
+ getVendor () == Triple::SCEI &&
463
+ getOS () == Triple::PS4;
464
+ }
465
+
466
+ // / \brief Tests whether the target is the PS4 platform
467
+ bool isPS4 () const {
468
+ return getVendor () == Triple::SCEI &&
469
+ getOS () == Triple::PS4;
470
+ }
471
+
458
472
// / @}
459
473
// / @name Mutators
460
474
// / @{
Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
163
163
case CUDA: return " cuda" ;
164
164
case NVCL: return " nvcl" ;
165
165
case AMDHSA: return " amdhsa" ;
166
+ case PS4: return " ps4" ;
166
167
}
167
168
168
169
llvm_unreachable (" Invalid OSType" );
@@ -356,6 +357,7 @@ static Triple::OSType parseOS(StringRef OSName) {
356
357
.StartsWith (" cuda" , Triple::CUDA)
357
358
.StartsWith (" nvcl" , Triple::NVCL)
358
359
.StartsWith (" amdhsa" , Triple::AMDHSA)
360
+ .StartsWith (" ps4" , Triple::PS4)
359
361
.Default (Triple::UnknownOS);
360
362
}
361
363
You can’t perform that action at this time.
0 commit comments