diff --git a/llvm/include/llvm/ADT/Triple.h b/llvm/include/llvm/ADT/Triple.h --- a/llvm/include/llvm/ADT/Triple.h +++ b/llvm/include/llvm/ADT/Triple.h @@ -824,6 +824,12 @@ return getArch() == Triple::riscv32 || getArch() == Triple::riscv64; } + /// Tests whether the target is Sparc. + bool isSparc() const { + return getArch() == Triple::sparc || getArch() == Triple::sparcv9 || + getArch() == Triple::sparcel; + } + /// Tests whether the target is SystemZ. bool isSystemZ() const { return getArch() == Triple::systemz;