summaryrefslogtreecommitdiff
path: root/rust/src/low_level_il/operation.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 /rust/src/low_level_il/operation.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 'rust/src/low_level_il/operation.rs')
-rw-r--r--rust/src/low_level_il/operation.rs20
1 files changed, 8 insertions, 12 deletions
diff --git a/rust/src/low_level_il/operation.rs b/rust/src/low_level_il/operation.rs
index f2ce9d1a..6e0dda91 100644
--- a/rust/src/low_level_il/operation.rs
+++ b/rust/src/low_level_il/operation.rs
@@ -90,11 +90,14 @@ where
}
}
-impl<M, O> Operation<'_, M, NonSSA<LiftedNonSSA>, O>
+impl<M, O> Operation<'_, M, NonSSA, O>
where
M: FunctionMutability,
O: OperationArguments,
{
+ /// Get the [`CoreFlagWrite`] for the operation.
+ ///
+ /// NOTE: This is only expected to be present for lifted IL.
pub fn flag_write(&self) -> Option<CoreFlagWrite> {
match self.op.flags {
0 => None,
@@ -1419,9 +1422,10 @@ where
// Valid only in Lifted IL
pub struct FlagGroup;
-impl<M> Operation<'_, M, NonSSA<LiftedNonSSA>, FlagGroup>
+impl<M, F> Operation<'_, M, F, FlagGroup>
where
M: FunctionMutability,
+ F: FunctionForm,
{
pub fn flag_group(&self) -> CoreFlagGroup {
let id = self.op.operands[0] as u32;
@@ -1432,9 +1436,10 @@ where
}
}
-impl<M> Debug for Operation<'_, M, NonSSA<LiftedNonSSA>, FlagGroup>
+impl<M, F> Debug for Operation<'_, M, F, FlagGroup>
where
M: FunctionMutability,
+ F: FunctionForm,
{
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.debug_struct("FlagGroup")
@@ -1443,15 +1448,6 @@ where
}
}
-impl<M> Debug for Operation<'_, M, SSA, FlagGroup>
-where
- M: FunctionMutability,
-{
- fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
- f.debug_struct("FlagGroup").finish()
- }
-}
-
// LLIL_TRAP
pub struct Trap;