[ADT][Triple] Add environment kinds for LoongArch GNU multiarch tuples
authorWANG Xuerui <git@xen0n.name>
Thu, 10 Nov 2022 05:51:12 +0000 (13:51 +0800)
committerWeining Lu <luweining@loongson.cn>
Thu, 10 Nov 2022 07:05:04 +0000 (15:05 +0800)
commitd480271729236fa194ceddde420f37527a466270
tree9af10ba648a969b162f6c91ab21eda966240a5b0
parenta86b506294bc7b9a921e3e613f49730c5780eb22
[ADT][Triple] Add environment kinds for LoongArch GNU multiarch tuples

The canonical multiarch tuples for LoongArch are defined in [the
LoongArch toolchain conventions][1] document. As the musl port is still
WIP, only the GNU triples are added for now.

The spec mentions `loongarch64-linux-gnuf64`, which is functionally the
same as the existing `loongarch64-linux-gnu` triple, only with the
floating-point ABI part explicitly spelled out. Both forms are
supported, but normalization of one into another is not implemented in
this patch, to give the ecosystem some time to experiment and discuss.

[1]: https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D135751
llvm/include/llvm/ADT/Triple.h
llvm/lib/Support/Triple.cpp
llvm/unittests/ADT/TripleTest.cpp