mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
Add Triple::isMIPS()/isMIPS32()/isMIPS64(). NFC
There are quite a few if statements that enumerate all these cases. It gets even worse in our fork of LLVM where we also have a Triple::cheri (which is mips64 + CHERI instructions) and we had to update all if statements that check for Triple::mips64 to also handle Triple::cheri. This patch helps to reduce our diff to upstream and should also make some checks more readable. Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D48548 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335493 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -529,8 +529,7 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) {
|
||||
// MIPS .debug_* sections should have SHT_MIPS_DWARF section type
|
||||
// to distinguish among sections contain DWARF and ECOFF debug formats.
|
||||
// Sections with ECOFF debug format are obsoleted and marked by SHT_PROGBITS.
|
||||
if (T.getArch() == Triple::mips || T.getArch() == Triple::mipsel ||
|
||||
T.getArch() == Triple::mips64 || T.getArch() == Triple::mips64el)
|
||||
if (T.isMIPS())
|
||||
DebugSecType = ELF::SHT_MIPS_DWARF;
|
||||
|
||||
// Debug Info Sections.
|
||||
|
||||
Reference in New Issue
Block a user