diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 04dd8b60547..4fd4b2c627f 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -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(); @@ -99,7 +99,7 @@ public: virtual const char *getPassName() const; /// getPassID - Return the PassID number that corresponds to this pass. - virtual AnalysisID getPassID() const { + AnalysisID getPassID() const { return PassID; } diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index c90bfeda1ce..fca9466bfdf 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -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;