From ac6754f98f1f570122e79b90113688243421e13a Mon Sep 17 00:00:00 2001 From: Rot127 Date: Fri, 6 Dec 2024 15:30:24 -0500 Subject: [PATCH] Add some asserts in inc files. --- arch/AArch64/AArch64GenDisassemblerTables.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/AArch64/AArch64GenDisassemblerTables.inc b/arch/AArch64/AArch64GenDisassemblerTables.inc index 55dd1bae71..4d0a762778 100644 --- a/arch/AArch64/AArch64GenDisassemblerTables.inc +++ b/arch/AArch64/AArch64GenDisassemblerTables.inc @@ -28341,7 +28341,7 @@ static const uint8_t DecoderTableFallback32[] = { static bool checkDecoderPredicate(MCInst *Inst, unsigned Idx) { switch (Idx) { - default: /* llvm_unreachable("Invalid index!"); */ + default: CS_ASSERT_RET_VAL(0 && "Invalid index!", false); case 0: return (AArch64_getFeatureBits(Inst->csh->mode, AArch64_FeatureAll) || AArch64_getFeatureBits(Inst->csh->mode, AArch64_FeatureSME)); case 1: @@ -28552,7 +28552,7 @@ static DecodeStatus fname(DecodeStatus S, unsigned Idx, InsnType insn, MCInst *M *DecodeComplete = true; \ InsnType tmp; \ switch (Idx) { \ - default: /* llvm_unreachable("Invalid index!"); */ \ + default: CS_ASSERT_RET_VAL(0 && "Invalid index!", MCDisassembler_Fail); \ case 0: \ tmp = fieldname(insn, 0, 16); \ MCOperand_CreateImm0(MI, tmp); \