|
@@ -73,9 +73,6 @@ class AnalysisDeclContext {
|
|
|
|
|
|
const Decl *D;
|
|
const Decl *D;
|
|
|
|
|
|
- // TranslationUnit is NULL if we don't have multiple translation units.
|
|
|
|
- idx::TranslationUnit *TU;
|
|
|
|
-
|
|
|
|
OwningPtr<CFG> cfg, completeCFG;
|
|
OwningPtr<CFG> cfg, completeCFG;
|
|
OwningPtr<CFGStmtMap> cfgStmtMap;
|
|
OwningPtr<CFGStmtMap> cfgStmtMap;
|
|
|
|
|
|
@@ -98,12 +95,10 @@ class AnalysisDeclContext {
|
|
|
|
|
|
public:
|
|
public:
|
|
AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
|
|
AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
|
|
- const Decl *D,
|
|
|
|
- idx::TranslationUnit *TU);
|
|
|
|
|
|
+ const Decl *D);
|
|
|
|
|
|
AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
|
|
AnalysisDeclContext(AnalysisDeclContextManager *Mgr,
|
|
const Decl *D,
|
|
const Decl *D,
|
|
- idx::TranslationUnit *TU,
|
|
|
|
const CFG::BuildOptions &BuildOptions);
|
|
const CFG::BuildOptions &BuildOptions);
|
|
|
|
|
|
~AnalysisDeclContext();
|
|
~AnalysisDeclContext();
|
|
@@ -111,8 +106,6 @@ public:
|
|
ASTContext &getASTContext() { return D->getASTContext(); }
|
|
ASTContext &getASTContext() { return D->getASTContext(); }
|
|
const Decl *getDecl() const { return D; }
|
|
const Decl *getDecl() const { return D; }
|
|
|
|
|
|
- idx::TranslationUnit *getTranslationUnit() const { return TU; }
|
|
|
|
-
|
|
|
|
/// Return the build options used to construct the CFG.
|
|
/// Return the build options used to construct the CFG.
|
|
CFG::BuildOptions &getCFGBuildOptions() {
|
|
CFG::BuildOptions &getCFGBuildOptions() {
|
|
return cfgBuildOptions;
|
|
return cfgBuildOptions;
|
|
@@ -212,10 +205,6 @@ public:
|
|
|
|
|
|
AnalysisDeclContext *getAnalysisDeclContext() const { return Ctx; }
|
|
AnalysisDeclContext *getAnalysisDeclContext() const { return Ctx; }
|
|
|
|
|
|
- idx::TranslationUnit *getTranslationUnit() const {
|
|
|
|
- return Ctx->getTranslationUnit();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
const LocationContext *getParent() const { return Parent; }
|
|
const LocationContext *getParent() const { return Parent; }
|
|
|
|
|
|
bool isParentOf(const LocationContext *LC) const;
|
|
bool isParentOf(const LocationContext *LC) const;
|
|
@@ -383,7 +372,7 @@ public:
|
|
|
|
|
|
~AnalysisDeclContextManager();
|
|
~AnalysisDeclContextManager();
|
|
|
|
|
|
- AnalysisDeclContext *getContext(const Decl *D, idx::TranslationUnit *TU = 0);
|
|
|
|
|
|
+ AnalysisDeclContext *getContext(const Decl *D);
|
|
|
|
|
|
bool getUseUnoptimizedCFG() const {
|
|
bool getUseUnoptimizedCFG() const {
|
|
return !cfgBuildOptions.PruneTriviallyFalseEdges;
|
|
return !cfgBuildOptions.PruneTriviallyFalseEdges;
|
|
@@ -402,9 +391,8 @@ public:
|
|
}
|
|
}
|
|
|
|
|
|
// Get the top level stack frame.
|
|
// 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.
|
|
// Get a stack frame with parent.
|