diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-11-22 11:34:43 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-11-22 11:34:43 +0000 |
commit | 5bf5e31c5aff9c687193bef371a5e2a58e3010d7 (patch) | |
tree | 1cf4435a5b5c46ccc15f4021f831191ebbb1040a /llvm/lib/IR/PassManager.cpp | |
parent | fd8e416879bd204c6c0d52efb4b04d3ac1213632 (diff) | |
download | bcm5719-llvm-5bf5e31c5aff9c687193bef371a5e2a58e3010d7.tar.gz bcm5719-llvm-5bf5e31c5aff9c687193bef371a5e2a58e3010d7.zip |
[PM] Fix the analysis templates' usage of IRUnitT.
This is supposed to be the whole type of the IR unit, and so we
shouldn't pass a pointer to it but rather the value itself. In turn, we
need to provide a 'Module *' as that type argument (for example). This
will become more relevant with SCCs or other units which may not be
passed as a pointer type, but also brings consistency with the
transformation pass templates.
llvm-svn: 195445
Diffstat (limited to 'llvm/lib/IR/PassManager.cpp')
-rw-r--r-- | llvm/lib/IR/PassManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/PassManager.cpp index c4c2d1471f7..f2d0cd99e61 100644 --- a/llvm/lib/IR/PassManager.cpp +++ b/llvm/lib/IR/PassManager.cpp @@ -33,12 +33,12 @@ void ModuleAnalysisManager::invalidate(Module *M, const PreservedAnalyses &PA) { ModuleAnalysisResults.erase(I); } -const detail::AnalysisResultConcept<Module> & +const detail::AnalysisResultConcept<Module *> & ModuleAnalysisManager::getResultImpl(void *PassID, Module *M) { ModuleAnalysisResultMapT::iterator RI; bool Inserted; llvm::tie(RI, Inserted) = ModuleAnalysisResults.insert(std::make_pair( - PassID, polymorphic_ptr<detail::AnalysisResultConcept<Module> >())); + PassID, polymorphic_ptr<detail::AnalysisResultConcept<Module *> >())); if (Inserted) { // We don't have a cached result for this result. Look up the pass and run @@ -100,7 +100,7 @@ void FunctionAnalysisManager::clear() { FunctionAnalysisResultLists.clear(); } -const detail::AnalysisResultConcept<Function> & +const detail::AnalysisResultConcept<Function *> & FunctionAnalysisManager::getResultImpl(void *PassID, Function *F) { FunctionAnalysisResultMapT::iterator RI; bool Inserted; |