diff --git a/include/llvm/Analysis/DataStructure.h b/include/llvm/Analysis/DataStructure.h index 1d5500d6a52..ae7b3571da6 100644 --- a/include/llvm/Analysis/DataStructure.h +++ b/include/llvm/Analysis/DataStructure.h @@ -437,6 +437,19 @@ public: return *N.second; } + // invalidateFunction - Inform this analysis that you changed the specified + // function, so the graphs that depend on it are out of date. + // + void invalidateFunction(Function *F) const { + // FIXME: THis should invalidate all functions who have inlined the + // specified graph! + // + std::pair &N = DSInfo[F]; + delete N.first; + delete N.second; + N.first = N.second = 0; + } + // print - Print out the analysis results... void print(std::ostream &O, Module *M) const; diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h index 1d5500d6a52..ae7b3571da6 100644 --- a/include/llvm/Analysis/DataStructure/DataStructure.h +++ b/include/llvm/Analysis/DataStructure/DataStructure.h @@ -437,6 +437,19 @@ public: return *N.second; } + // invalidateFunction - Inform this analysis that you changed the specified + // function, so the graphs that depend on it are out of date. + // + void invalidateFunction(Function *F) const { + // FIXME: THis should invalidate all functions who have inlined the + // specified graph! + // + std::pair &N = DSInfo[F]; + delete N.first; + delete N.second; + N.first = N.second = 0; + } + // print - Print out the analysis results... void print(std::ostream &O, Module *M) const;