diff --git a/cranelift/frontend/src/switch.rs b/cranelift/frontend/src/switch.rs index 25cba38ac3..e4c147d16b 100644 --- a/cranelift/frontend/src/switch.rs +++ b/cranelift/frontend/src/switch.rs @@ -62,6 +62,11 @@ impl Switch { ); } + /// Get a reference to all existing entries + pub fn entries(&self) -> &HashMap { + &self.cases + } + /// Turn the `cases` `HashMap` into a list of `ContiguousCaseRange`s. /// /// # Postconditions