diff options
author | Chris Lattner <sabre@nondot.org> | 2003-03-21 21:41:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-03-21 21:41:02 +0000 |
commit | f1ab454b71efae1a5cee7f9285d91b75ead6a8a7 (patch) | |
tree | 12aebcb9e185b5faa5fa8fc41e3f74be39e95641 /include | |
parent | 6f2ec7f59daa76df2bd98c4dda3d46cd20c66d37 (diff) | |
download | external_llvm-f1ab454b71efae1a5cee7f9285d91b75ead6a8a7.zip external_llvm-f1ab454b71efae1a5cee7f9285d91b75ead6a8a7.tar.gz external_llvm-f1ab454b71efae1a5cee7f9285d91b75ead6a8a7.tar.bz2 |
Add helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Pass.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 7138fad..9e8976e 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -142,6 +142,14 @@ public: return dynamic_cast<AnalysisType*>(Resolver->getAnalysisToUpdate(PI)); } + /// mustPreserveAnalysisID - This method serves the same function as + /// getAnalysisToUpdate, but works if you just have an AnalysisID. This + /// obviously cannot give you a properly typed instance of the class if you + /// don't have the class name available (use getAnalysisToUpdate if you do), + /// but it can tell you if you need to preserve the pass at least. + /// + bool mustPreserveAnalysisID(const PassInfo *AnalysisID) const; + /// getAnalysis<AnalysisType>() - This function is used by subclasses to get /// to the analysis information that they claim to use by overriding the /// getAnalysisUsage function. |