From e86c7956d6ac34766a6f727fc33fcfd6eccffc4e Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 28 Mar 2018 21:53:10 +0000 Subject: [PATCH] Merge nested "if"s. NFC. llvm-svn: 328733 --- lld/ELF/Writer.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 76bf6612e88a..3036af124c04 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -2097,12 +2097,10 @@ static uint16_t getELFType() { } static uint8_t getAbiVersion() { - if (Config->EMachine == EM_MIPS) { - // Increment the ABI version for non-PIC executable files. - if (getELFType() == ET_EXEC && - (Config->EFlags & (EF_MIPS_PIC | EF_MIPS_CPIC)) == EF_MIPS_CPIC) - return 1; - } + // MIPS non-PIC executable gets ABI version 1. + if (Config->EMachine == EM_MIPS && getELFType() == ET_EXEC && + (Config->EFlags & (EF_MIPS_PIC | EF_MIPS_CPIC)) == EF_MIPS_CPIC) + return 1; return 0; }