File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,10 @@ pub trait Callbacks {
109109 fn after_parsing ( & mut self , _compiler : & interface:: Compiler ) -> bool {
110110 true
111111 }
112+ /// Called after expansion and returns true to continue execution
113+ fn after_expansion ( & mut self , _compiler : & interface:: Compiler ) -> bool {
114+ true
115+ }
112116 /// Called after analysis and returns true to continue execution
113117 fn after_analysis ( & mut self , _compiler : & interface:: Compiler ) -> bool {
114118 true
@@ -312,6 +316,11 @@ pub fn run_compiler(
312316 return sess. compile_status ( ) ;
313317 }
314318
319+ compiler. expansion ( ) ?;
320+ if !callbacks. after_expansion ( compiler) {
321+ return sess. compile_status ( ) ;
322+ }
323+
315324 compiler. prepare_outputs ( ) ?;
316325
317326 if sess. opts . output_types . contains_key ( & OutputType :: DepInfo )
You can’t perform that action at this time.
0 commit comments