diff options
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r-- | include/llvm/Pass.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 3c89130..f604921 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -219,6 +219,15 @@ public: return AnalysisID(NextID++, CreatePass<AnalysisType>); } + // Special Copy Constructor - This is how analysis passes declare that they + // only depend on the CFG of the function they are working on, so they are not + // invalidated by other passes that do not modify the CFG. This should be + // used like this: + // AnalysisID DominatorSet::ID(AnalysisID::create<DominatorSet>(), true); + // + AnalysisID(const AnalysisID &AID, bool DependsOnlyOnCFG = false); + + inline Pass *createPass() const { return Constructor(*this); } inline bool operator==(const AnalysisID &A) const { |