Initialize BasicAAWrapperPass in it's constructor

Summary: This idiom is used elsewhere in LLVM, but was overlooked here.

Reviewers: chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13628

llvm-svn: 251348
This commit is contained in:
Keno Fischer 2015-10-26 21:22:58 +00:00
parent ff8a80b477
commit 277bfaefaf
2 changed files with 5 additions and 1 deletions

View File

@ -203,7 +203,7 @@ class BasicAAWrapperPass : public FunctionPass {
public:
static char ID;
BasicAAWrapperPass() : FunctionPass(ID) {}
BasicAAWrapperPass();
BasicAAResult &getResult() { return *Result; }
const BasicAAResult &getResult() const { return *Result; }

View File

@ -1567,6 +1567,10 @@ BasicAAResult BasicAA::run(Function &F, AnalysisManager<Function> *AM) {
AM->getCachedResult<LoopAnalysis>(F));
}
BasicAAWrapperPass::BasicAAWrapperPass() : FunctionPass(ID) {
initializeBasicAAWrapperPassPass(*PassRegistry::getPassRegistry());
}
char BasicAAWrapperPass::ID = 0;
void BasicAAWrapperPass::anchor() {}