diff options
author | Duncan Sands <baldrick@free.fr> | 2009-01-28 13:14:17 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-01-28 13:14:17 +0000 |
commit | 1465d61bdd36cfd6021036a527895f0dd358e97d (patch) | |
tree | 5a066582fade4aa68d9608de87fb15a0400fe12a /include/llvm/PassAnalysisSupport.h | |
parent | e02f724880ddb7ffe296cda3ffb9822761a13ce7 (diff) | |
download | external_llvm-1465d61bdd36cfd6021036a527895f0dd358e97d.zip external_llvm-1465d61bdd36cfd6021036a527895f0dd358e97d.tar.gz external_llvm-1465d61bdd36cfd6021036a527895f0dd358e97d.tar.bz2 |
Rename getAnalysisToUpdate to getAnalysisIfAvailable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/PassAnalysisSupport.h')
-rw-r--r-- | include/llvm/PassAnalysisSupport.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/llvm/PassAnalysisSupport.h b/include/llvm/PassAnalysisSupport.h index c6ed179..f8b139e 100644 --- a/include/llvm/PassAnalysisSupport.h +++ b/include/llvm/PassAnalysisSupport.h @@ -143,8 +143,8 @@ public: AnalysisImpls.push_back(pir); } - // getAnalysisToUpdate - Return an analysis result or null if it doesn't exist - Pass *getAnalysisToUpdate(AnalysisID ID, bool Direction) const; + // getAnalysisIfAvailable - Return analysis result or null if it doesn't exist + Pass *getAnalysisIfAvailable(AnalysisID ID, bool Direction) const; // AnalysisImpls - This keeps track of which passes implements the interfaces // that are required by the current pass (to implement getAnalysis()). @@ -157,22 +157,22 @@ private: PMDataManager &PM; }; -/// getAnalysisToUpdate<AnalysisType>() - This function is used by subclasses -/// to get to the analysis information that might be around that needs to be -/// updated. This is different than getAnalysis in that it can fail (ie the -/// analysis results haven't been computed), so should only be used if you -/// provide the capability to update an analysis that exists. This method is -/// often used by transformation APIs to update analysis results for a pass -/// automatically as the transform is performed. +/// getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to +/// get analysis information that might be around, for example to update it. +/// This is different than getAnalysis in that it can fail (if the analysis +/// results haven't been computed), so should only be used if you can handle +/// the case when the analysis is not available. This method is often used by +/// transformation APIs to update analysis results for a pass automatically as +/// the transform is performed. /// template<typename AnalysisType> -AnalysisType *Pass::getAnalysisToUpdate() const { +AnalysisType *Pass::getAnalysisIfAvailable() const { assert(Resolver && "Pass not resident in a PassManager object!"); const PassInfo *PI = getClassPassInfo<AnalysisType>(); if (PI == 0) return 0; return dynamic_cast<AnalysisType*> - (Resolver->getAnalysisToUpdate(PI, true)); + (Resolver->getAnalysisIfAvailable(PI, true)); } /// getAnalysis<AnalysisType>() - This function is used by subclasses to get |