Have FunctionBuilder clear the ILBuilder's state in its drop().
This commit is contained in:
@@ -168,6 +168,13 @@ where
|
||||
debug_assert!(self.results.is_empty());
|
||||
debug_assert!(self.side_effects.is_empty());
|
||||
}
|
||||
|
||||
/// Tests whether an `SSABuilder` is in a cleared state.
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.variables.is_empty() && self.blocks.is_empty() && self.ebb_headers.is_empty() &&
|
||||
self.calls.is_empty() &&
|
||||
self.results.is_empty() && self.side_effects.is_empty()
|
||||
}
|
||||
}
|
||||
|
||||
// Small enum used for clarity in some functions.
|
||||
|
||||
Reference in New Issue
Block a user