From 7e32ee8b629e3e4f8d061cbe0729ff961b3502d7 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sat, 10 May 2025 19:24:35 -0400 Subject: [Rust] Remove `NonSSAVariant` bound from `LowLevelILFunction` We don't do enough with the lifted il != non lifted il to justify the bound. This makes modifying IL much less work as the historical lifted il bound is gone. --- plugins/warp/src/cache.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins/warp/src/cache.rs') diff --git a/plugins/warp/src/cache.rs b/plugins/warp/src/cache.rs index 7219b547..cc8dfded 100644 --- a/plugins/warp/src/cache.rs +++ b/plugins/warp/src/cache.rs @@ -3,10 +3,8 @@ use crate::{build_function, function_guid}; use binaryninja::binary_view::{BinaryView, BinaryViewExt}; use binaryninja::confidence::MAX_CONFIDENCE; use binaryninja::function::Function as BNFunction; -use binaryninja::low_level_il::function::{ - FunctionMutability, LowLevelILFunction, NonSSA, RegularNonSSA, -}; -use binaryninja::low_level_il::RegularLowLevelILFunction; +use binaryninja::low_level_il::function::{FunctionMutability, LowLevelILFunction, NonSSA}; +use binaryninja::low_level_il::LowLevelILRegularFunction; use binaryninja::rc::Guard; use binaryninja::rc::Ref as BNRef; use binaryninja::symbol::Symbol as BNSymbol; @@ -67,7 +65,7 @@ pub fn try_cached_function_match(function: &BNFunction) -> Option { .to_owned() } -pub fn cached_function(function: &BNFunction, llil: &RegularLowLevelILFunction) -> Function { +pub fn cached_function(function: &BNFunction, llil: &LowLevelILRegularFunction) -> Function { let view = function.view(); let view_id = ViewID::from(view.as_ref()); let function_cache = FUNCTION_CACHE.get_or_init(Default::default); @@ -120,7 +118,7 @@ where pub fn cached_function_guid( function: &BNFunction, - llil: &LowLevelILFunction>, + llil: &LowLevelILFunction, ) -> FunctionGUID { let view = function.view(); let view_id = ViewID::from(view); @@ -198,7 +196,7 @@ pub struct FunctionCache { } impl FunctionCache { - pub fn function(&self, function: &BNFunction, llil: &RegularLowLevelILFunction) -> Function { + pub fn function(&self, function: &BNFunction, llil: &LowLevelILRegularFunction) -> Function { let function_id = FunctionID::from(function); match self.cache.get(&function_id) { Some(function) => function.value().to_owned(), @@ -325,7 +323,7 @@ impl GUIDCache { pub fn function_guid( &self, function: &BNFunction, - llil: &LowLevelILFunction>, + llil: &LowLevelILFunction, ) -> FunctionGUID { let function_id = FunctionID::from(function); match self.cache.get(&function_id) { -- cgit v1.3.1