@@ -267,15 +267,11 @@ impl<M: FunctionMutability> LowLevelILFunction<M, SSA> {
267267 reg : LowLevelILSSARegisterKind < R > ,
268268 ) -> Vec < LowLevelILInstruction < ' _ , M , SSA > > {
269269 use binaryninjacore_sys:: BNGetLowLevelILSSARegisterUses ;
270- let register_id = match reg {
271- LowLevelILSSARegisterKind :: Full { kind, .. } => kind. id ( ) ,
272- LowLevelILSSARegisterKind :: Partial { partial_reg, .. } => partial_reg. id ( ) ,
273- } ;
274270 let mut count = 0 ;
275271 let instrs = unsafe {
276272 BNGetLowLevelILSSARegisterUses (
277273 self . handle ,
278- register_id . into ( ) ,
274+ reg . id ( ) . into ( ) ,
279275 reg. version ( ) as usize ,
280276 & mut count,
281277 )
@@ -295,14 +291,10 @@ impl<M: FunctionMutability> LowLevelILFunction<M, SSA> {
295291 reg : & LowLevelILSSARegisterKind < R > ,
296292 ) -> Option < LowLevelILInstruction < ' _ , M , SSA > > {
297293 use binaryninjacore_sys:: BNGetLowLevelILSSARegisterDefinition ;
298- let register_id = match reg {
299- LowLevelILSSARegisterKind :: Full { kind, .. } => kind. id ( ) ,
300- LowLevelILSSARegisterKind :: Partial { partial_reg, .. } => partial_reg. id ( ) ,
301- } ;
302294 let instr_idx = unsafe {
303295 BNGetLowLevelILSSARegisterDefinition (
304296 self . handle ,
305- register_id . into ( ) ,
297+ reg . id ( ) . into ( ) ,
306298 reg. version ( ) as usize ,
307299 )
308300 } ;
@@ -315,12 +307,8 @@ impl<M: FunctionMutability> LowLevelILFunction<M, SSA> {
315307 & self ,
316308 reg : & LowLevelILSSARegisterKind < R > ,
317309 ) -> Option < RegisterValue > {
318- let register_id = match reg {
319- LowLevelILSSARegisterKind :: Full { kind, .. } => kind. id ( ) ,
320- LowLevelILSSARegisterKind :: Partial { partial_reg, .. } => partial_reg. id ( ) ,
321- } ;
322310 let value = unsafe {
323- BNGetLowLevelILSSARegisterValue ( self . handle , register_id . into ( ) , reg. version ( ) as usize )
311+ BNGetLowLevelILSSARegisterValue ( self . handle , reg . id ( ) . into ( ) , reg. version ( ) as usize )
324312 } ;
325313 if value. state == BNRegisterValueType :: UndeterminedValue {
326314 return None ;
0 commit comments