From: Simon Atanasyan Date: Thu, 1 May 2014 11:57:40 +0000 (+0000) Subject: [llvm-readobj] Transform 'switch' with the only 'case' statement X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=217b5866d1449b68d51fba0f654e30afb9dd9418;p=oota-llvm.git [llvm-readobj] Transform 'switch' with the only 'case' statement to 'if' statement. No functional changes, git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207748 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index 21f9866035f..856de7ce958 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -485,14 +485,11 @@ void ELFDumper::printFileHeaders() { W.printHex ("Entry", Header->e_entry); W.printHex ("ProgramHeaderOffset", Header->e_phoff); W.printHex ("SectionHeaderOffset", Header->e_shoff); - switch (Header->e_machine) { - case EM_MIPS: + if (Header->e_machine == EM_MIPS) W.printFlags("Flags", Header->e_flags, makeArrayRef(ElfHeaderMipsFlags), unsigned(ELF::EF_MIPS_ARCH)); - break; - default: + else W.printFlags("Flags", Header->e_flags); - } W.printNumber("HeaderSize", Header->e_ehsize); W.printNumber("ProgramHeaderEntrySize", Header->e_phentsize); W.printNumber("ProgramHeaderCount", Header->e_phnum);