diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-21 18:46:45 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-21 18:46:45 +0000 |
commit | e407c1d1583cfc788fa7d00fee5f612c3f224983 (patch) | |
tree | 9a435a96a85d310bef7c8debd3be7fd2db2db026 /include/llvm/Pass.h | |
parent | b1e51f6910d23b7383c44a4650092c14be791bf8 (diff) | |
download | llvm-e407c1d1583cfc788fa7d00fee5f612c3f224983.tar.gz llvm-e407c1d1583cfc788fa7d00fee5f612c3f224983.tar.bz2 llvm-e407c1d1583cfc788fa7d00fee5f612c3f224983.tar.xz |
Move several non-performance-critical member functinos out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r-- | include/llvm/Pass.h | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 8d0c47d7bb..5a5893140e 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -31,7 +31,6 @@ #include "llvm/System/DataTypes.h" -#include <cassert> #include <string> #include <utility> #include <vector> @@ -89,13 +88,8 @@ class Pass { Pass(const Pass &); // DO NOT IMPLEMENT public: - explicit Pass(PassKind K, intptr_t pid) : Resolver(0), PassID(pid), Kind(K) { - assert(pid && "pid cannot be 0"); - } - explicit Pass(PassKind K, const void *pid) - : Resolver(0), PassID((intptr_t)pid), Kind(K) { - assert(pid && "pid cannot be 0"); - } + explicit Pass(PassKind K, intptr_t pid); + explicit Pass(PassKind K, const void *pid); virtual ~Pass(); @@ -138,13 +132,8 @@ public: virtual PassManagerType getPotentialPassManagerType() const; // Access AnalysisResolver - inline void setResolver(AnalysisResolver *AR) { - assert(!Resolver && "Resolver is already set"); - Resolver = AR; - } - inline AnalysisResolver *getResolver() { - return Resolver; - } + void setResolver(AnalysisResolver *AR); + AnalysisResolver *getResolver() const { return Resolver; } /// getAnalysisUsage - This function should be overriden by passes that need /// analysis information to do their job. If a pass specifies that it uses a @@ -170,11 +159,9 @@ public: /// an analysis interface through multiple inheritance. If needed, it should /// override this to adjust the this pointer as needed for the specified pass /// info. - virtual void *getAdjustedAnalysisPointer(const PassInfo *) { - return this; - } - virtual ImmutablePass *getAsImmutablePass() { return 0; } - virtual PMDataManager *getAsPMDataManager() { return 0; } + virtual void *getAdjustedAnalysisPointer(const PassInfo *); + virtual ImmutablePass *getAsImmutablePass(); + virtual PMDataManager *getAsPMDataManager(); /// verifyAnalysis() - This member can be implemented by a analysis pass to /// check state of analysis information. |