summaryrefslogtreecommitdiff
path: root/plugins/warp/src/cache.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-05-10 19:24:35 -0400
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-05-12 17:45:24 -0400
commit7e32ee8b629e3e4f8d061cbe0729ff961b3502d7 (patch)
treeb33eedcd9afb5422aefd1a42e95f4a9ab2e7cca0 /plugins/warp/src/cache.rs
parent4180c31fda63b6ccb9ce4ee543031fe4a5060d5f (diff)
[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.
Diffstat (limited to 'plugins/warp/src/cache.rs')
-rw-r--r--plugins/warp/src/cache.rs14
1 files changed, 6 insertions, 8 deletions
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<Function> {
.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<M: FunctionMutability>(
function: &BNFunction,
- llil: &LowLevelILFunction<M, NonSSA<RegularNonSSA>>,
+ llil: &LowLevelILFunction<M, NonSSA>,
) -> 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<M: FunctionMutability>(
&self,
function: &BNFunction,
- llil: &LowLevelILFunction<M, NonSSA<RegularNonSSA>>,
+ llil: &LowLevelILFunction<M, NonSSA>,
) -> FunctionGUID {
let function_id = FunctionID::from(function);
match self.cache.get(&function_id) {