[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 10:27:17 PDT 2024
================
@@ -115,6 +115,30 @@ StringRef Triple::getArchName(ArchType Kind, SubArchType SubArch) {
if (SubArch == AArch64SubArch_arm64e)
return "arm64e";
break;
+ case Triple::dxil:
+ switch (SubArch) {
+ case Triple::DXILSubArch_v1_0:
+ return "dxilv1.0";
+ case Triple::DXILSubArch_v1_1:
+ return "dxilv1.1";
+ case Triple::DXILSubArch_v1_2:
+ return "dxilv1.2";
+ case Triple::DXILSubArch_v1_3:
+ return "dxilv1.3";
+ case Triple::DXILSubArch_v1_4:
+ return "dxilv1.4";
+ case Triple::DXILSubArch_v1_5:
+ return "dxilv1.5";
+ case Triple::DXILSubArch_v1_6:
+ return "dxilv1.6";
+ case Triple::DXILSubArch_v1_7:
+ return "dxilv1.7";
+ case Triple::DXILSubArch_v1_8:
+ return "dxilv1.8";
+ default:
+ report_fatal_error("Unknown DXIL Version",
+ /*gen_crash_diag=*/false);
----------------
bogner wrote:
I don't think we should crash if we have an architecture without a subarch. We don't for any of the other architectures.
https://github.com/llvm/llvm-project/pull/89823
More information about the cfe-commits
mailing list