================
@@ -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:

You should do what Aaron has said basically, my call on the `!hasTarget` check 
was because I was reviewing the PR before I checked if it was making sense 
here, so I have removed the comment to avoid confusion.

https://github.com/llvm/llvm-project/pull/190840
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to