tra added a comment.

In D117137#3268548 <https://reviews.llvm.org/D117137#3268548>, @linjamaki wrote:

> SPIR-V target requires that the OS and the environment type is unknown (see 
> TargetInfo::AllocateTarget and BaseSPIRTargetInfo).

The problem is that LLVM's triple parser will set `UnknownVendor` for *any* 
vendor it does not know about. As I've pointed in the previous comment 
positively checking for an unknown vendor leads to a somewhat odd situation, 
when a triple "vpirv64-whoknowswhat" will be accepted, but "spirv64-suse" will 
not, even though both are equally nonsensical as far as spirv is concerned.

If SPIRV needs a vendor-specific treatment, then it probably needs a specific 
vendor enum for that. `UnknownVendor` is ill-suited for that purpose.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117137/new/

https://reviews.llvm.org/D117137

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to