Skip to content

Commit

Permalink
Devirtualize Pass::getPassID, overriding it isn't useful and it gets …
Browse files Browse the repository at this point in the history
…called a lot.

While at it pull the trivial ctor in line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145124 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
d0k committed Nov 24, 2011
1 parent b3ff49e commit 8a42633
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/llvm/Pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Pass {
Pass(const Pass &); // DO NOT IMPLEMENT

public:
explicit Pass(PassKind K, char &pid);
explicit Pass(PassKind K, char &pid) : Resolver(0), PassID(&pid), Kind(K) { }
virtual ~Pass();


Expand All @@ -99,7 +99,7 @@ class Pass {
virtual const char *getPassName() const;

/// getPassID - Return the PassID number that corresponds to this pass.
virtual AnalysisID getPassID() const {
AnalysisID getPassID() const {
return PassID;
}

Expand Down
2 changes: 0 additions & 2 deletions lib/VMCore/Pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ using namespace llvm;
// Pass Implementation
//

Pass::Pass(PassKind K, char &pid) : Resolver(0), PassID(&pid), Kind(K) { }

// Force out-of-line virtual method.
Pass::~Pass() {
delete Resolver;
Expand Down

0 comments on commit 8a42633

Please sign in to comment.