diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -1206,6 +1206,24 @@ } void Triple::setArch(ArchType Kind) { + if (getSubArch() == Triple::MipsSubArch_r6) { + switch (Kind) { + case Triple::mips: + setArchName("mipsisa32r6"); + return; + case Triple::mipsel: + setArchName("mipsisa32r6el"); + return; + case Triple::mips64: + setArchName("mipsisa64r6"); + return; + case Triple::mips64el: + setArchName("mipsisa64r6el"); + return; + default: + llvm_unreachable("unexpected Triple for MIPS r6"); + } + } setArchName(getArchTypeName(Kind)); }