[docs][NewPM] Add comment about declaring analysis managers in the correct order

Otherwise you will likely get crashes.
This commit is contained in:
Arthur Eubanks 2023-10-19 10:21:22 -07:00
parent 30520cdff6
commit 6b8a1425ea

View File

@ -17,6 +17,8 @@ Just Tell Me How To Run The Default Optimization Pipeline With The New Pass Mana
.. code-block:: c++
// Create the analysis managers.
// These must be declared in this order so that they are destroyed in the
// correct order due to inter-analysis-manager references.
LoopAnalysisManager LAM;
FunctionAnalysisManager FAM;
CGSCCAnalysisManager CGAM;