Both PassSupport.h and PassAnalysisSupport.h are only supposed to be included via Pass.h.
This patch fixes the case where PassRegistry.cpp was including PassSupport.h and adds #ifndef error checks to help ensure it doesn't happen again.
Differential D78815
[Pass] Ensure we don't include PassSupport.h/PassAnalysisSupport.h directly RKSimon on Apr 24 2020, 9:35 AM. Authored by
Details Both PassSupport.h and PassAnalysisSupport.h are only supposed to be included via Pass.h. This patch fixes the case where PassRegistry.cpp was including PassSupport.h and adds #ifndef error checks to help ensure it doesn't happen again.
Diff Detail
Unit Tests Event TimelineComment Actions There are still a bunch of other users of the headers in tree, but the error doesn't trigger since Pass.h gets included before. Is that worth changing as well? Comment Actions Add check that PassSupport.h/PassAnalysisSupport.h aren't included again after Pass.h has been included. Many of the additional file changes have implicit Pass.h includes but since the PassSupport.h/PassAnalysisSupport.h include was explicit I've added a Pass.h include.
|
clang-format: please reformat the code