@@ -104,6 +104,36 @@ where
104104 }
105105}
106106
107+ impl < M , R > LowLevelILExpression < ' _ , M , SSA , R >
108+ where
109+ M : FunctionMutability ,
110+ R : ExpressionResultType ,
111+ {
112+ pub fn non_ssa_form < ' func > (
113+ & self ,
114+ non_ssa : & ' func LowLevelILFunction < M , NonSSA > ,
115+ ) -> LowLevelILExpression < ' func , M , NonSSA , R > {
116+ use binaryninjacore_sys:: BNGetLowLevelILNonSSAExprIndex ;
117+ let idx = unsafe { BNGetLowLevelILNonSSAExprIndex ( self . function . handle , self . index . 0 ) } ;
118+ LowLevelILExpression :: new ( non_ssa, LowLevelExpressionIndex ( idx) )
119+ }
120+ }
121+
122+ impl < M , R > LowLevelILExpression < ' _ , M , NonSSA , R >
123+ where
124+ M : FunctionMutability ,
125+ R : ExpressionResultType ,
126+ {
127+ pub fn ssa_form < ' func > (
128+ & self ,
129+ ssa : & ' func LowLevelILFunction < M , SSA > ,
130+ ) -> LowLevelILExpression < ' func , M , SSA , R > {
131+ use binaryninjacore_sys:: BNGetLowLevelILSSAExprIndex ;
132+ let idx = unsafe { BNGetLowLevelILSSAExprIndex ( self . function . handle , self . index . 0 ) } ;
133+ LowLevelILExpression :: new ( ssa, LowLevelExpressionIndex ( idx) )
134+ }
135+ }
136+
107137impl < ' func , M > ExpressionHandler < ' func , M , SSA > for LowLevelILExpression < ' func , M , SSA , ValueExpr >
108138where
109139 M : FunctionMutability ,
0 commit comments