[clang] [Clang] diagnosing missing Vulkan environment when using SPIR-V triple (PR #190840)
Tony Guillot via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 08:15:43 PDT 2026
================
@@ -112,6 +112,18 @@ void CompilerInstance::setTarget(TargetInfo *Value) { Target = Value; }
void CompilerInstance::setAuxTarget(TargetInfo *Value) { AuxTarget = Value; }
bool CompilerInstance::createTarget() {
+
+ // SPIR-V targeting requires a fully specified Vulkan environment.
+ // Validate here before CreateTargetInfo() to emit a proper diagnostic
+ llvm::Triple Triple(getInvocation().getTargetOpts().Triple);
----------------
to268 wrote:
If the diagnostic stays where it is after you moved your check in the right place, it should also be moved in the `Frontend` directory.
> I guess that would make sense since the td file I made the error in was FrontendKinds
Yep, that's the reason behind it.
https://github.com/llvm/llvm-project/pull/190840
More information about the cfe-commits
mailing list