[PATCH] D50857: llvm: Add support MIPS r6 Debian triples
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 18 01:14:19 PDT 2018
atanasyan added inline comments.
================
Comment at: lib/Support/Triple.cpp:545
static Triple::SubArchType parseSubArch(StringRef SubArchName) {
+ if (SubArchName.startswith("mipsisa32r6") ||
+ SubArchName.startswith("mipsisa64r6") ||
----------------
atanasyan wrote:
> Is it possible to simplify this statement
> ```
> if (SubArchName.startswith("mipsisa32r6") ||
> SubArchName.startswith("mipsisa64r6") ||
> (SubArchName.startswith("mips") &&
> (SubArchName.endswith("r6el") || SubArchName.endswith("r6"))))
> return Triple::MipsSubArch_r6;
> ```
>
> and convert it to this form?
> ```
> if (SubArchName.startswith("mips") && (SubArchName.endswith("r6el") || SubArchName.endswith("r6")))
> return Triple::MipsSubArch_r6;
> ```
>
> Will we miss some target triples in that case?
By the way, if change the code as I suggested above, no one test from unittests/ADT/TripleTest.cpp failed. It means either the change is correct or the need to add more unit tests.
Repository:
rL LLVM
https://reviews.llvm.org/D50857
More information about the llvm-commits
mailing list