Skip to content

Commit 372a459

Browse files
committed
add check for spirv
1 parent d0cc4e9 commit 372a459

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4297,6 +4297,11 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
42974297
Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported)
42984298
<< VulkanEnv << T.getOSName() << T.str();
42994299
}
4300+
if (Args.getLastArg(OPT_fnative_half_type)) {
4301+
if (!(Opts.LangStd >= LangStandard::lang_hlsl2021))
4302+
Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported)
4303+
<< VulkanEnv << T.getOSName() << T.str();
4304+
}
43004305
} else {
43014306
llvm_unreachable("expected DXIL or SPIR-V target");
43024307
}

0 commit comments

Comments
 (0)