llvm.org GIT mirror llvm / df9ec10
Move getAnalysisToUpdate to after the definition of AnalysisResolver. GCC 3.4 apparently wants classes to be DEFINED before they are USED. What is it smoking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8213 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
2 changed file(s) with 17 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
135135 /// automatically as the transform is performed.
136136 ///
137137 template
138 AnalysisType *getAnalysisToUpdate() const {
139 assert(Resolver && "Pass not resident in a PassManager object!");
140 const PassInfo *PI = getClassPassInfo();
141 if (PI == 0) return 0;
142 return dynamic_cast(Resolver->getAnalysisToUpdate(PI));
143 }
138 AnalysisType *getAnalysisToUpdate() const; // Defined in PassAnalysisSupport.h
144139
145140 /// mustPreserveAnalysisID - This method serves the same function as
146141 /// getAnalysisToUpdate, but works if you just have an AnalysisID. This
109109 void setAnalysisResolver(Pass *P, AnalysisResolver *AR);
110110 };
111111
112 /// getAnalysisToUpdate() - This function is used by subclasses
113 /// to get to the analysis information that might be around that needs to be
114 /// updated. This is different than getAnalysis in that it can fail (ie the
115 /// analysis results haven't been computed), so should only be used if you
116 /// provide the capability to update an analysis that exists. This method is
117 /// often used by transformation APIs to update analysis results for a pass
118 /// automatically as the transform is performed.
119 ///
120 template
121 AnalysisType *Pass::getAnalysisToUpdate() const {
122 assert(Resolver && "Pass not resident in a PassManager object!");
123 const PassInfo *PI = getClassPassInfo();
124 if (PI == 0) return 0;
125 return dynamic_cast(Resolver->getAnalysisToUpdate(PI));
126 }
127
112128 #endif