[llvm] r232811 - Fold a llvm_unreachable into an assert. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Fri Mar 20 06:50:15 PDT 2015
Author: rafael
Date: Fri Mar 20 08:50:15 2015
New Revision: 232811
URL: http://llvm.org/viewvc/llvm-project?rev=232811&view=rev
Log:
Fold a llvm_unreachable into an assert. NFC.
Modified:
llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp?rev=232811&r1=232810&r2=232811&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp Fri Mar 20 08:50:15 2015
@@ -174,7 +174,8 @@ unsigned X86ELFObjectWriter::GetRelocTyp
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::GetRelocTyp
break;
}
}
- } else
- llvm_unreachable("Unsupported ELF machine type.");
+ }
return Type;
}
More information about the llvm-commits
mailing list