summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-03-11 11:05:24 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-03-11 11:05:24 +0000
commitb47f8010a95f461f995e30dc2b77391093183605 (patch)
tree49902b63ea6fa976481a52ca24f1797e3f60ed67 /llvm/lib/IR
parentf4cc1fc7e9d7df18176fc139b30f78c24ac0cc31 (diff)
downloadbcm5719-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/IR')
-rw-r--r--llvm/lib/IR/Dominators.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp
index b9d4fb7de88..d230ee52acc 100644
--- a/llvm/lib/IR/Dominators.cpp
+++ b/llvm/lib/IR/Dominators.cpp
@@ -313,16 +313,16 @@ char DominatorTreeAnalysis::PassID;
DominatorTreePrinterPass::DominatorTreePrinterPass(raw_ostream &OS) : OS(OS) {}
PreservedAnalyses DominatorTreePrinterPass::run(Function &F,
- FunctionAnalysisManager *AM) {
+ FunctionAnalysisManager &AM) {
OS << "DominatorTree for function: " << F.getName() << "\n";
- AM->getResult<DominatorTreeAnalysis>(F).print(OS);
+ AM.getResult<DominatorTreeAnalysis>(F).print(OS);
return PreservedAnalyses::all();
}
PreservedAnalyses DominatorTreeVerifierPass::run(Function &F,
- FunctionAnalysisManager *AM) {
- AM->getResult<DominatorTreeAnalysis>(F).verifyDomTree();
+ FunctionAnalysisManager &AM) {
+ AM.getResult<DominatorTreeAnalysis>(F).verifyDomTree();
return PreservedAnalyses::all();
}
OpenPOWER on IntegriCloud