tra added a comment.

In D117137#3269365 <https://reviews.llvm.org/D117137#3269365>, @yaxunl wrote:

> Does that mean only "spirv{64}-unknown-unknown" is acceptable, or 
> "spirv{64}-amd-unknown-unknown" is also acceptable?

My point is that `unknown` part of the triple is a catch-all for `anything, 
including something invalid` and should not be used for positive checks.
If we do not care about those parts of the triple ( accepting invalid triple 
would imply it), then we should not check those parts at all. 
Otherwise it leads to a weird inconsistency -- invalid triple like 
`spirv64-foo-bar`is accepted, but an equally nonsensical triple like 
`spir64-suse-whatever`which happens to use a known vendor or OS parts is not.

The bottom line is that if there's currently no known use of the vendor/OS/env 
parts of the triple, then we should not be checking them. 
If we do want to accept specific triple, then appropriate enums should be 
used/added.


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