diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-26 19:19:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-26 19:19:16 +0000 |
commit | aabff771653cb70b9b53d9beee027d680c5e29fd (patch) | |
tree | e01badb6ba848c120810b789d50c830804a46742 /include | |
parent | ce6ef112c4abb1f7fd64738c5760f48cddc9a4a5 (diff) | |
download | external_llvm-aabff771653cb70b9b53d9beee027d680c5e29fd.zip external_llvm-aabff771653cb70b9b53d9beee027d680c5e29fd.tar.gz external_llvm-aabff771653cb70b9b53d9beee027d680c5e29fd.tar.bz2 |
Analysis contructors now no longer take AnalysisID's as their argument,
because there is a one-one mapping between classes and analyses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/PassAnalysisSupport.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/PassAnalysisSupport.h b/include/llvm/PassAnalysisSupport.h index 5952a46..c105c39 100644 --- a/include/llvm/PassAnalysisSupport.h +++ b/include/llvm/PassAnalysisSupport.h @@ -20,7 +20,7 @@ // GCC 2.95.3 crashes if we do that, doh. // template<class AnalysisType> -static Pass *CreatePass(AnalysisID ID) { return new AnalysisType(ID); } +static Pass *CreatePass() { return new AnalysisType(); } //===----------------------------------------------------------------------===// // AnalysisID - This class is used to uniquely identify an analysis pass that @@ -29,10 +29,10 @@ static Pass *CreatePass(AnalysisID ID) { return new AnalysisType(ID); } class AnalysisID { static unsigned NextID; // Next ID # to deal out... unsigned ID; // Unique ID for this analysis - Pass *(*Constructor)(AnalysisID); // Constructor to return the Analysis + Pass *(*Constructor)(); // Constructor to return the Analysis AnalysisID(); // Disable default ctor - AnalysisID(unsigned id, Pass *(*Ct)(AnalysisID)) : ID(id), Constructor(Ct) {} + AnalysisID(unsigned id, Pass *(*Ct)()) : ID(id), Constructor(Ct) {} public: // create - the only way to define a new AnalysisID. This static method is // supposed to be used to define the class static AnalysisID's that are @@ -56,7 +56,7 @@ public: AnalysisID(const AnalysisID &AID, bool DependsOnlyOnCFG = false); - inline Pass *createPass() const { return Constructor(*this); } + inline Pass *createPass() const { return Constructor(); } inline bool operator==(const AnalysisID &A) const { return A.ID == ID; |