summaryrefslogtreecommitdiff
path: root/include/llvm/Pass.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-11-24 21:14:11 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-11-24 21:14:11 +0000
commit8a42633273e01ed867c69edd3039a3b122ee79b2 (patch)
tree57717c161b474f973c8d10d35783fea79317ed05 /include/llvm/Pass.h
parentb3ff49e923225d0f7242ef5ac554bdef34c1b216 (diff)
downloadllvm-8a42633273e01ed867c69edd3039a3b122ee79b2.tar.gz
llvm-8a42633273e01ed867c69edd3039a3b122ee79b2.tar.bz2
llvm-8a42633273e01ed867c69edd3039a3b122ee79b2.tar.xz
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
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r--include/llvm/Pass.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 04dd8b6054..4fd4b2c627 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;
}