Devirtualize Pass::getPassID, overriding it isn't useful and it gets 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
This commit is contained in:
Benjamin Kramer 2011-11-24 21:14:11 +00:00
parent b3ff49e923
commit 8a42633273
2 changed files with 2 additions and 4 deletions

View File

@ -86,7 +86,7 @@ class Pass {
Pass(const Pass &); // DO NOT IMPLEMENT Pass(const Pass &); // DO NOT IMPLEMENT
public: public:
explicit Pass(PassKind K, char &pid); explicit Pass(PassKind K, char &pid) : Resolver(0), PassID(&pid), Kind(K) { }
virtual ~Pass(); virtual ~Pass();
@ -99,7 +99,7 @@ public:
virtual const char *getPassName() const; virtual const char *getPassName() const;
/// getPassID - Return the PassID number that corresponds to this pass. /// getPassID - Return the PassID number that corresponds to this pass.
virtual AnalysisID getPassID() const { AnalysisID getPassID() const {
return PassID; return PassID;
} }

View File

@ -25,8 +25,6 @@ using namespace llvm;
// Pass Implementation // Pass Implementation
// //
Pass::Pass(PassKind K, char &pid) : Resolver(0), PassID(&pid), Kind(K) { }
// Force out-of-line virtual method. // Force out-of-line virtual method.
Pass::~Pass() { Pass::~Pass() {
delete Resolver; delete Resolver;