File tree Expand file tree Collapse file tree 2 files changed +208
-271
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 2 files changed +208
-271
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,18 @@ mod needs;
3434mod tests;
3535
3636pub struct DirectivesCache {
37+ /// "Conditions" used by `ignore-*` and `only-*` directives, prepared in
38+ /// advance so that they don't have to be evaluated repeatedly.
39+ cfg_conditions : cfg:: PreparedConditions ,
3740 needs : CachedNeedsConditions ,
3841}
3942
4043impl DirectivesCache {
4144 pub fn load ( config : & Config ) -> Self {
42- Self { needs : CachedNeedsConditions :: load ( config) }
45+ Self {
46+ cfg_conditions : cfg:: prepare_conditions ( config) ,
47+ needs : CachedNeedsConditions :: load ( config) ,
48+ }
4349 }
4450}
4551
@@ -1058,8 +1064,8 @@ pub(crate) fn make_test_description(
10581064 } ;
10591065 }
10601066
1061- decision ! ( cfg:: handle_ignore( config , ln) ) ;
1062- decision ! ( cfg:: handle_only( config , ln) ) ;
1067+ decision ! ( cfg:: handle_ignore( & cache . cfg_conditions , ln) ) ;
1068+ decision ! ( cfg:: handle_only( & cache . cfg_conditions , ln) ) ;
10631069 decision ! ( needs:: handle_needs( & cache. needs, config, ln) ) ;
10641070 decision ! ( ignore_llvm( config, ln) ) ;
10651071 decision ! ( ignore_backends( config, ln) ) ;
You can’t perform that action at this time.
0 commit comments