diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-09-10 05:44:00 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-09-10 05:44:00 +0000 |
commit | b317f8f5ca8737a5bbad97a3f7566a2dbd2ed61b (patch) | |
tree | dbab3bddeef187575b62017955dc3caccaf9c922 /lib/Analysis/BugReporter.cpp | |
parent | f84a4a469d8a45c76cb941595582a0fd3b9b15d3 (diff) |
Make AnalysisManager stateless. Now other analyzer components only depends on
local node information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 23ca53d6e9..c15161c708 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -36,14 +36,6 @@ BugReporterContext::~BugReporterContext() { if ((*I)->isOwnedByReporterContext()) delete *I; } -const Decl& BugReporterContext::getCodeDecl() { - return *BR.getEngine().getAnalysisManager().getCodeDecl(); -} - -const CFG& BugReporterContext::getCFG() { - return *BR.getEngine().getAnalysisManager().getCFG(); -} - //===----------------------------------------------------------------------===// // Helper routines for walking the ExplodedGraph and fetching statements. //===----------------------------------------------------------------------===// @@ -158,11 +150,9 @@ public: PathDiagnosticLocation ExecutionContinues(llvm::raw_string_ostream& os, const ExplodedNode* N); - ParentMap& getParentMap() { - if (PM.get() == 0) - PM.reset(new ParentMap(getCodeDecl().getBody())); - return *PM.get(); - } + Decl const &getCodeDecl() { return R->getEndNode()->getCodeDecl(); } + + ParentMap& getParentMap() { return R->getEndNode()->getParentMap(); } const Stmt *getParent(const Stmt *S) { return getParentMap().getParent(S); |