Skip to content

Commit

Permalink
Initialize BasicAAWrapperPass in it's constructor
Browse files Browse the repository at this point in the history
Summary: This idiom is used elsewhere in LLVM, but was overlooked here.

Reviewers: chandlerc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251348 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Keno committed Oct 26, 2015
1 parent b522682 commit 5d34bb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/llvm/Analysis/BasicAliasAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 4 additions & 0 deletions lib/Analysis/BasicAliasAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}

Expand Down

0 comments on commit 5d34bb0

Please sign in to comment.