[clang] [libcxx] [llvm] Triple::normalize: Use none as OS for XX-none-ABI (PR #89638)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 19:32:16 PDT 2024


MaskRay wrote:

> When we parse 3-components triples, if the Arch and Env have been parsed successfully, we have to make a choice between Vendor and OS for the unrecoginzed component. Noramlly it is the middle one.
> 
> In the current code, Vendor is choosed, and then OS is fallbacked to unknown. It is OK for most cases. But if the unrecoginzed component is `none`, it is expected to be OS instead of Vendor.

Suggested:

When parsing a 3-component triple, after we determine Arch and Env, if the middle component is "none", treat it as OS instead of Vendor.


https://github.com/llvm/llvm-project/pull/89638


More information about the cfe-commits mailing list