@@ -2,7 +2,9 @@ use std::collections::HashMap;
22
33use crate :: ir:: types:: InstMatcherType ;
44use crate :: ir:: values:: InstMatcherValue ;
5+ use crate :: matchers:: exception:: AllocaExceptionInstMatcher ;
56use crate :: matchers:: exception:: EHTypeIdInstMatcher ;
7+ use crate :: matchers:: exception:: FreeExceptionInstMatcher ;
68use crate :: matchers:: exception:: InvokeInstMatcher ;
79use crate :: matchers:: exception:: LandingPadInstMatcher ;
810use crate :: matchers:: exception:: ResumeInstMatcher ;
@@ -23,6 +25,8 @@ pub fn register_exception_inst_matchers_functions(
2325 map. insert ( "m_throw" , match_throw_inst) ;
2426 map. insert ( "m_rethrow" , match_rethrow_inst) ;
2527 map. insert ( "m_eh_typeid" , match_eh_typeid_inst) ;
28+ map. insert ( "m_alloca_exception" , match_alloca_exception_inst) ;
29+ map. insert ( "m_free_exception" , match_free_exception_inst) ;
2630}
2731
2832#[ inline( always) ]
@@ -76,6 +80,22 @@ pub fn register_exception_inst_matchers_function_signatures(
7680 return_type : Box :: new ( InstMatcherType ) ,
7781 } ,
7882 ) ;
83+
84+ map. insert (
85+ "m_alloca_exception" ,
86+ Signature {
87+ parameters : vec ! [ ] ,
88+ return_type : Box :: new ( InstMatcherType ) ,
89+ } ,
90+ ) ;
91+
92+ map. insert (
93+ "m_free_exception" ,
94+ Signature {
95+ parameters : vec ! [ ] ,
96+ return_type : Box :: new ( InstMatcherType ) ,
97+ } ,
98+ ) ;
7999}
80100
81101fn match_invoke_inst ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
@@ -107,3 +127,13 @@ fn match_eh_typeid_inst(_values: &[Box<dyn Value>]) -> Box<dyn Value> {
107127 let matcher = Box :: new ( EHTypeIdInstMatcher ) ;
108128 Box :: new ( InstMatcherValue { matcher } )
109129}
130+
131+ fn match_alloca_exception_inst ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
132+ let matcher = Box :: new ( AllocaExceptionInstMatcher ) ;
133+ Box :: new ( InstMatcherValue { matcher } )
134+ }
135+
136+ fn match_free_exception_inst ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
137+ let matcher = Box :: new ( FreeExceptionInstMatcher ) ;
138+ Box :: new ( InstMatcherValue { matcher } )
139+ }
0 commit comments