[PATCH] D51464: clang: fix MIPS/N32 triple and paths
Simon Atanasyan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 28 07:16:49 PDT 2018
atanasyan added inline comments.
================
Comment at: lib/Driver/ToolChains/Arch/Mips.cpp:85
if (ABIName.empty() &&
(Triple.getVendor() == llvm::Triple::MipsTechnologies ||
----------------
Is possible to rewrite this piece of code (lines 85-114) as follows?
```
if (ABIName.empty() && (Triple.getEnvironment() == llvm::Triple::GNUABIN32))
ABIName = "n32";
if (ABIName.empty() &&
(Triple.getVendor() == llvm::Triple::MipsTechnologies ||
Triple.getVendor() == llvm::Triple::ImaginationTechnologies)) {
ABIName = llvm::StringSwitch<const char *>(CPUName)
.Case("mips1", "o32")
.Case("mips2", "o32")
.Case("mips3", "n64")
.Case("mips4", "n64")
.Case("mips5", "n64")
.Case("mips32", "o32")
.Case("mips32r2", "o32")
.Case("mips32r3", "o32")
.Case("mips32r5", "o32")
.Case("mips32r6", "o32")
.Case("mips64", "n64")
.Case("mips64r2", "n64")
.Case("mips64r3", "n64")
.Case("mips64r5", "n64")
.Case("mips64r6", "n64")
.Case("octeon", "n64")
.Case("p5600", "o32")
.Default("");
}
```
================
Comment at: lib/Driver/ToolChains/Gnu.cpp:2082
BiarchTripleAliases.append(begin(MIPSELTriples), end(MIPSELTriples));
- BiarchTripleAliases.append(begin(MIPSTriples), end(MIPSTriples));
+ BiarchLibDirs.append(begin(MIPSN32ELLibDirs), end(MIPSN32ELLibDirs));
+ BiarchTripleAliases.append(begin(MIPSN32ELTriples), end(MIPSN32ELTriples));
----------------
Why do you remove `BiarchTripleAliases.append(begin(MIPSTriples), end(MIPSTriples));` in that case only? Is it intended?
https://reviews.llvm.org/D51464
More information about the cfe-commits
mailing list