[cfe-commits] r155751 - in /cfe/trunk: include/clang/Analysis/AnalysisContext.h include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h lib/Analysis/AnalysisDeclContext.cpp lib/Sema/AnalysisBasedWarnings.cpp lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Jordy Rose
jediknil at belkadan.com
Fri Apr 27 18:58:09 PDT 2012
Author: jrose
Date: Fri Apr 27 20:58:08 2012
New Revision: 155751
URL: http://llvm.org/viewvc/llvm-project?rev=155751&view=rev
Log:
[analyzer] Remove references to idx::TranslationUnit. Index is dead, cross-TU inlining never panned out.
Modified:
cfe/trunk/include/clang/Analysis/AnalysisContext.h
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp
cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Modified: cfe/trunk/include/clang/Analysis/AnalysisContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/AnalysisContext.h?rev=155751&r1=155750&r2=155751&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/AnalysisContext.h (original)
+++ cfe/trunk/include/clang/Analysis/AnalysisContext.h Fri Apr 27 20:58:08 2012
@@ -73,9 +73,6 @@
const Decl *D;
- // TranslationUnit is NULL if we don't have multiple translation units.
- idx::TranslationUnit *TU;
-
OwningPtr<CFG> cfg, completeCFG;
OwningPtr<CFGStmtMap> cfgStmtMap;
@@ -98,12 +95,10 @@
public:
AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
- const Decl *D,
- idx::TranslationUnit *TU);
+ const Decl *D);
AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
const Decl *D,
- idx::TranslationUnit *TU,
const CFG::BuildOptions &BuildOptions);
~AnalysisDeclContext();
@@ -111,8 +106,6 @@
ASTContext &getASTContext() { return D->getASTContext(); }
const Decl *getDecl() const { return D; }
- idx::TranslationUnit *getTranslationUnit() const { return TU; }
-
/// Return the build options used to construct the CFG.
CFG::BuildOptions &getCFGBuildOptions() {
return cfgBuildOptions;
@@ -212,10 +205,6 @@
AnalysisDeclContext *getAnalysisDeclContext() const { return Ctx; }
- idx::TranslationUnit *getTranslationUnit() const {
- return Ctx->getTranslationUnit();
- }
-
const LocationContext *getParent() const { return Parent; }
bool isParentOf(const LocationContext *LC) const;
@@ -383,7 +372,7 @@
~AnalysisDeclContextManager();
- AnalysisDeclContext *getContext(const Decl *D, idx::TranslationUnit *TU = 0);
+ AnalysisDeclContext *getContext(const Decl *D);
bool getUseUnoptimizedCFG() const {
return !cfgBuildOptions.PruneTriviallyFalseEdges;
@@ -402,9 +391,8 @@
}
// Get the top level stack frame.
- const StackFrameContext *getStackFrame(Decl const *D,
- idx::TranslationUnit *TU) {
- return LocContexts.getStackFrame(getContext(D, TU), 0, 0, 0, 0);
+ const StackFrameContext *getStackFrame(const Decl *D) {
+ return LocContexts.getStackFrame(getContext(D), 0, 0, 0, 0);
}
// Get a stack frame with parent.
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h?rev=155751&r1=155750&r2=155751&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h Fri Apr 27 20:58:08 2012
@@ -190,10 +190,6 @@
return AnaCtxMgr.getContext(D);
}
- AnalysisDeclContext *getAnalysisDeclContext(const Decl *D, idx::TranslationUnit *TU) {
- return AnaCtxMgr.getContext(D, TU);
- }
-
};
} // enAnaCtxMgrspace
Modified: cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp?rev=155751&r1=155750&r2=155751&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp (original)
+++ cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp Fri Apr 27 20:58:08 2012
@@ -34,11 +34,9 @@
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,
- 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 @@
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;
}
Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=155751&r1=155750&r2=155751&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original)
+++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Fri Apr 27 20:58:08 2012
@@ -830,7 +830,7 @@
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.
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp?rev=155751&r1=155750&r2=155751&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Fri Apr 27 20:58:08 2012
@@ -526,7 +526,7 @@
}
// 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
More information about the cfe-commits
mailing list