diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-10-23 14:22:18 +0000 |
| commit | 73490b890977362d28dd6326843a1ecae413921d (patch) | |
| tree | 3fdd91eae574e32453a4baf462961c742df2691a /include/clang/Analysis/PathSensitive | |
| parent | a5f348eb914e67b51914117fac117c18c1f8d650 (diff) | |
Diffstat (limited to 'include/clang/Analysis/PathSensitive')
| -rw-r--r-- | include/clang/Analysis/PathSensitive/AnalysisContext.h | 8 | ||||
| -rw-r--r-- | include/clang/Analysis/PathSensitive/AnalysisManager.h | 5 | ||||
| -rw-r--r-- | include/clang/Analysis/PathSensitive/Store.h | 5 |
3 files changed, 17 insertions, 1 deletions
diff --git a/include/clang/Analysis/PathSensitive/AnalysisContext.h b/include/clang/Analysis/PathSensitive/AnalysisContext.h index ffe282d3caa3..8e02ccf38209 100644 --- a/include/clang/Analysis/PathSensitive/AnalysisContext.h +++ b/include/clang/Analysis/PathSensitive/AnalysisContext.h @@ -60,6 +60,9 @@ public: ~AnalysisContextManager(); AnalysisContext *getContext(const Decl *D); + + // Discard all previously created AnalysisContexts. + void clear(); }; class LocationContext : public llvm::FoldingSetNode { @@ -155,12 +158,17 @@ class LocationContextManager { llvm::FoldingSet<LocationContext> Contexts; public: + ~LocationContextManager(); + StackFrameContext *getStackFrame(AnalysisContext *ctx, const LocationContext *parent, const Stmt *s); ScopeContext *getScope(AnalysisContext *ctx, const LocationContext *parent, const Stmt *s); + + /// Discard all previously created LocationContext objects. + void clear(); }; } // end clang namespace diff --git a/include/clang/Analysis/PathSensitive/AnalysisManager.h b/include/clang/Analysis/PathSensitive/AnalysisManager.h index e97f80576a8b..1a64f56ee8a4 100644 --- a/include/clang/Analysis/PathSensitive/AnalysisManager.h +++ b/include/clang/Analysis/PathSensitive/AnalysisManager.h @@ -65,6 +65,11 @@ public: AScope(ScopeDecl), DisplayedFunction(!displayProgress), VisualizeEGDot(vizdot), VisualizeEGUbi(vizubi), PurgeDead(purge), EagerlyAssume(eager), TrimGraph(trim) {} + + void ClearContexts() { + LocCtxMgr.clear(); + AnaCtxMgr.clear(); + } StoreManagerCreator getStoreManagerCreator() { return CreateStoreMgr; diff --git a/include/clang/Analysis/PathSensitive/Store.h b/include/clang/Analysis/PathSensitive/Store.h index 3ff253d0abf3..7a462c579f9f 100644 --- a/include/clang/Analysis/PathSensitive/Store.h +++ b/include/clang/Analysis/PathSensitive/Store.h @@ -141,9 +141,12 @@ public: const VarDecl *VD, const LocationContext *LC) = 0; + typedef llvm::DenseSet<SymbolRef> InvalidatedSymbols; + virtual const GRState *InvalidateRegion(const GRState *state, const MemRegion *R, - const Expr *E, unsigned Count) = 0; + const Expr *E, unsigned Count, + InvalidatedSymbols *IS) = 0; // FIXME: Make out-of-line. virtual const GRState *setExtent(const GRState *state, |
