diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2016-03-11 11:05:24 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2016-03-11 11:05:24 +0000 |
commit | b47f8010a95f461f995e30dc2b77391093183605 (patch) | |
tree | 49902b63ea6fa976481a52ca24f1797e3f60ed67 /llvm/lib/Transforms/IPO/FunctionAttrs.cpp | |
parent | f4cc1fc7e9d7df18176fc139b30f78c24ac0cc31 (diff) | |
download | bcm5719-llvm-b47f8010a95f461f995e30dc2b77391093183605.tar.gz bcm5719-llvm-b47f8010a95f461f995e30dc2b77391093183605.zip |
[PM] Make the AnalysisManager parameter to run methods a reference.
This was originally a pointer to support pass managers which didn't use
AnalysisManagers. However, that doesn't realistically come up much and
the complexity of supporting it doesn't really make sense.
In fact, *many* parts of the pass manager were just assuming the pointer
was never null already. This at least makes it much more explicit and
clear.
llvm-svn: 263219
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index 1c38e183032..7885ec7d612 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -987,13 +987,13 @@ static bool addNoRecurseAttrs(const SCCNodeSet &SCCNodes) { return setDoesNotRecurse(*F); } -PreservedAnalyses -PostOrderFunctionAttrsPass::run(LazyCallGraph::SCC &C, CGSCCAnalysisManager *AM) { +PreservedAnalyses PostOrderFunctionAttrsPass::run(LazyCallGraph::SCC &C, + CGSCCAnalysisManager &AM) { Module &M = *C.begin()->getFunction().getParent(); const ModuleAnalysisManager &MAM = - AM->getResult<ModuleAnalysisManagerCGSCCProxy>(C).getManager(); + AM.getResult<ModuleAnalysisManagerCGSCCProxy>(C).getManager(); FunctionAnalysisManager &FAM = - AM->getResult<FunctionAnalysisManagerCGSCCProxy>(C).getManager(); + AM.getResult<FunctionAnalysisManagerCGSCCProxy>(C).getManager(); // FIXME: Need some way to make it more reasonable to assume that this is // always cached. |