From 80ce448d9f963c5416fbfae62ac423386dd28357 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 9 Jan 2025 10:09:42 -0800 Subject: [PATCH] Typed assert in translate_dex_to_ir Summary: As title. Reviewed By: wsanville Differential Revision: D67961767 fbshipit-source-id: fc2529bfef93b6398432a38c6db4e7a88ad22ff2 --- libredex/IRCode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libredex/IRCode.cpp b/libredex/IRCode.cpp index daa17e3a6b..57516adc2e 100644 --- a/libredex/IRCode.cpp +++ b/libredex/IRCode.cpp @@ -422,7 +422,8 @@ void translate_dex_to_ir( } else if (op == OPCODE_FILL_ARRAY_DATA) { auto target = get_target(&*it, bm); auto data_it = entry_to_data.find(target); - always_assert(data_it != entry_to_data.end()); + always_assert_type_log(data_it != entry_to_data.end(), INVALID_DEX, + "Incorrect reference"); insn->set_data(std::move(data_it->second)); entry_to_data.erase(data_it); }