================
@@ -4258,6 +4258,18 @@ bool CompilerInvocation::ParseLangArgs(LangOptions 
&Opts, ArgList &Args,
       } else {
         llvm_unreachable("expected DXIL or SPIR-V target");
       }
+      // validate that if fnative-half-type is given, that
+      // the language standard is at least hlsl2021, and that
+      // the target shader model is at least 6.2
+      if (Args.getLastArg(OPT_fnative_half_type)) {
+        bool LangStdArgIsValid = Opts.LangStd >= LangStandard::lang_hlsl2021;
+        bool TPArgIsValid = T.getOSVersion() >= VersionTuple(6, 2);
----------------
bob80905 wrote:

TP originally stood for target profile. But yes, I think I'll just move the 
conditions directly into the `if`

https://github.com/llvm/llvm-project/pull/85340
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to