[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 18:20:29 PDT 2024


================
@@ -35,6 +38,11 @@ bool isLegalShaderModel(Triple &T) {
   if (Version.getSubminor())
     return false;
 
+  // DXIL Version should be set as SubArch
+  if (T.getSubArch() == Triple::NoSubArch) {
+    return false;
+  }
----------------
llvm-beanz wrote:

nit:
```suggestion
  if (T.getSubArch() == Triple::NoSubArch)
    return false;
```

see: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements

https://github.com/llvm/llvm-project/pull/89823


More information about the cfe-commits mailing list