From 4f8198e7888ab06db671e09fdfe2ade2c6f7ec27 Mon Sep 17 00:00:00 2001 From: Jordy Rose Date: Sat, 28 Apr 2012 01:58:08 +0000 Subject: [analyzer] Remove references to idx::TranslationUnit. Index is dead, cross-TU inlining never panned out. llvm-svn: 155751 --- clang/lib/Analysis/AnalysisDeclContext.cpp | 11 +++-------- clang/lib/Sema/AnalysisBasedWarnings.cpp | 2 +- clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) (limited to 'clang/lib') diff --git a/clang/lib/Analysis/AnalysisDeclContext.cpp b/clang/lib/Analysis/AnalysisDeclContext.cpp index 659cc6d3f1d..624373330f8 100644 --- a/clang/lib/Analysis/AnalysisDeclContext.cpp +++ b/clang/lib/Analysis/AnalysisDeclContext.cpp @@ -34,11 +34,9 @@ typedef llvm::DenseMap ManagedAnalysisMap; AnalysisDeclContext::AnalysisDeclContext(AnalysisDeclContextManager *Mgr, const Decl *d, - idx::TranslationUnit *tu, const CFG::BuildOptions &buildOptions) : Manager(Mgr), D(d), - TU(tu), cfgBuildOptions(buildOptions), forcedBlkExprs(0), builtCFG(false), @@ -50,11 +48,9 @@ AnalysisDeclContext::AnalysisDeclContext(AnalysisDeclContextManager *Mgr, } AnalysisDeclContext::AnalysisDeclContext(AnalysisDeclContextManager *Mgr, - const Decl *d, - idx::TranslationUnit *tu) + const Decl *d) : Manager(Mgr), D(d), - TU(tu), forcedBlkExprs(0), builtCFG(false), builtCompleteCFG(false), @@ -195,11 +191,10 @@ PseudoConstantAnalysis *AnalysisDeclContext::getPseudoConstantAnalysis() { return PCA.get(); } -AnalysisDeclContext *AnalysisDeclContextManager::getContext(const Decl *D, - idx::TranslationUnit *TU) { +AnalysisDeclContext *AnalysisDeclContextManager::getContext(const Decl *D) { AnalysisDeclContext *&AC = Contexts[D]; if (!AC) - AC = new AnalysisDeclContext(this, D, TU, cfgBuildOptions); + AC = new AnalysisDeclContext(this, D, cfgBuildOptions); return AC; } diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp index a8e679132c7..9e577d98855 100644 --- a/clang/lib/Sema/AnalysisBasedWarnings.cpp +++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp @@ -830,7 +830,7 @@ AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, const Stmt *Body = D->getBody(); assert(Body); - AnalysisDeclContext AC(/* AnalysisDeclContextManager */ 0, D, 0); + AnalysisDeclContext AC(/* AnalysisDeclContextManager */ 0, D); // Don't generate EH edges for CallExprs as we'd like to avoid the n^2 // explosion for destrutors that can result and the compile time hit. diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index ae783230f68..d79ac04a238 100644 --- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -526,7 +526,7 @@ void AnalysisConsumer::ActionExprEngine(Decl *D, bool ObjCGCEnabled, } // Execute the worklist algorithm. - Eng.ExecuteWorkList(Mgr->getAnalysisDeclContextManager().getStackFrame(D, 0), + Eng.ExecuteWorkList(Mgr->getAnalysisDeclContextManager().getStackFrame(D), Mgr->getMaxNodes()); // Release the auditor (if any) so that it doesn't monitor the graph -- cgit v1.2.3