Skip to content

Commit a63efd2

Browse files
committed
Use assert instead of branch-to-unreachable
(pretty sure we wrote this down in the style guide at some point)
1 parent 76c6a8b commit a63efd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86AsmPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,8 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
766766

767767
if (FeatureFlagsAnd) {
768768
// Emit a .note.gnu.property section with the flags.
769-
if (!TT.isArch32Bit() && !TT.isArch64Bit())
770-
llvm_unreachable("CFProtection used on invalid architecture!");
769+
assert((TT.isArch32Bit() || TT.isArch64Bit()) &&
770+
"CFProtection used on invalid architecture!");
771771
MCSection *Cur = OutStreamer->getCurrentSectionOnly();
772772
MCSection *Nt = MMI->getContext().getELFSection(
773773
".note.gnu.property", ELF::SHT_NOTE, ELF::SHF_ALLOC);

0 commit comments

Comments
 (0)