[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)
    Natalie Chouinard via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Jan  3 07:59:11 PST 2024
    
    
  
================
@@ -1328,6 +1331,31 @@ VersionTuple Triple::getDriverKitVersion() const {
   }
 }
 
+VersionTuple Triple::getVulkanVersion() const {
+  if (getArch() != spirv || getOS() != Vulkan)
+    llvm_unreachable("invalid Vulkan SPIR-V triple");
+
+  VersionTuple VulkanVersion = getOSVersion();
+  SubArchType SpirvVersion = getSubArch();
+
+  llvm::DenseMap<VersionTuple, SubArchType> ValidVersionMap = {
----------------
sudonatalie wrote:
Same as above, simply "unsupported" seems to be conventional and I slightly prefer that for maintainability (an error message with "we only support v1.2+spv1.5 and v1.3+spv1.6" is more likely to get out of sync).
https://github.com/llvm/llvm-project/pull/76749
    
    
More information about the cfe-commits
mailing list