diff options
author | Anna Zaks <ganna@apple.com> | 2012-04-03 02:05:47 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-04-03 02:05:47 +0000 |
commit | e62f048960645b79363408fdead53fec2a063c52 (patch) | |
tree | 9010101e69af556f2371b82cf4c346f39a23dfdc /include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h | |
parent | 0ea6164a7ff685f64ddfe3ec983a2b052ea91afb (diff) |
[analyzer] Record the basic blocks covered by the analyzes run.
Store this info inside the function summary generated for all analyzed
functions. This is useful for coverage stats and can be helpful for
analyzer state space search strategies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h index 85d92ff5f7..d9156441db 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h @@ -18,6 +18,7 @@ #include "clang/AST/Expr.h" #include "clang/Analysis/AnalysisContext.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h" #include "clang/StaticAnalyzer/Core/PathSensitive/WorkList.h" #include "clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h" #include "llvm/ADT/OwningPtr.h" @@ -83,6 +84,10 @@ private: /// AnalysisConsumer. It can be null. SetOfDecls *AnalyzedCallees; + /// The information about functions shared by the whole translation unit. + /// (This data is owned by AnalysisConsumer.) + FunctionSummariesTy *FunctionSummaries; + void generateNode(const ProgramPoint &Loc, ProgramStateRef State, ExplodedNode *Pred); @@ -104,11 +109,13 @@ private: public: /// Construct a CoreEngine object to analyze the provided CFG using /// a DFS exploration of the exploded graph. - CoreEngine(SubEngine& subengine, SetOfDecls *VisitedCallees) + CoreEngine(SubEngine& subengine, SetOfDecls *VisitedCallees, + FunctionSummariesTy *FS) : SubEng(subengine), G(new ExplodedGraph()), WList(WorkList::makeBFS()), BCounterFactory(G->getAllocator()), - AnalyzedCallees(VisitedCallees) {} + AnalyzedCallees(VisitedCallees), + FunctionSummaries(FS){} ~CoreEngine() { delete WList; |