From: Rafael Espindola Date: Fri, 20 Mar 2015 13:50:15 +0000 (+0000) Subject: Fold a llvm_unreachable into an assert. NFC. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e77cba1641a38bb0fd529016c7ab9bb23f453b3;p=platform%2Fupstream%2Fllvm.git Fold a llvm_unreachable into an assert. NFC. llvm-svn: 232811 --- diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp index c53a81a..493219c 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp @@ -174,7 +174,8 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target, break; } } - } else if (getEMachine() == ELF::EM_386) { + } else { + assert(getEMachine() == ELF::EM_386 && "Unsupported ELF machine type."); if (IsPCRel) { switch ((unsigned)Fixup.getKind()) { default: @@ -286,8 +287,7 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target, break; } } - } else - llvm_unreachable("Unsupported ELF machine type."); + } return Type; }