[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 21 15:01:08 PDT 2024


================
@@ -753,7 +753,8 @@ def err_drv_hlsl_unsupported_target : Error<
   "HLSL code generation is unsupported for target '%0'">;
 def err_drv_hlsl_bad_shader_required_in_target : Error<
   "%select{shader model|Vulkan environment|shader stage}0 is required as %select{OS|environment}1 in target '%2' for HLSL code generation">;
-
+def err_drv_hlsl_enable_16bit_types_option_invalid: Error<
+  "enable_16bit_types option only valid when target shader model [-T] is >= 6.2 and Hlsl Version [-HV] is >= 2021">;
----------------
damyanp wrote:

```suggestion
  "enable_16bit_types option only valid when target shader model [-T] is >= 6.2 and HLSL Version [-HV] is >= 2021">;
```

Looks like "HLSL" is spelled "HLSL" elsewhere.

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


More information about the cfe-commits mailing list