aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Pass.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 7138fadef5..9e8976e4de 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.