summaryrefslogtreecommitdiff
path: root/rust/src/low_level_il/operation.rs
diff options
context:
space:
mode:
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;