aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Driver/ASTConsumers.cpp6
-rw-r--r--Driver/ASTConsumers.h2
-rw-r--r--Driver/clang.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index 316bcd4c7b..fd7768cacc 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -516,6 +516,8 @@ namespace {
class LivenessVisitor : public CFGVisitor {
SourceManager *SM;
public:
+ LivenessVisitor(const std::string& fname) : CFGVisitor(fname) {}
+
virtual void Initialize(ASTContext &Context) {
SM = &Context.getSourceManager();
}
@@ -528,8 +530,8 @@ namespace {
};
} // end anonymous namespace
-ASTConsumer *clang::CreateLiveVarAnalyzer() {
- return new LivenessVisitor();
+ASTConsumer *clang::CreateLiveVarAnalyzer(const std::string& fname) {
+ return new LivenessVisitor(fname);
}
//===----------------------------------------------------------------------===//
diff --git a/Driver/ASTConsumers.h b/Driver/ASTConsumers.h
index a0745cd792..85940c86f6 100644
--- a/Driver/ASTConsumers.h
+++ b/Driver/ASTConsumers.h
@@ -36,7 +36,7 @@ ASTConsumer *CreateASTViewer();
ASTConsumer *CreateCFGDumper(bool ViewGraphs, const std::string& FName);
-ASTConsumer *CreateLiveVarAnalyzer();
+ASTConsumer *CreateLiveVarAnalyzer(const std::string& fname);
ASTConsumer *CreateDeadStoreChecker(Diagnostic &Diags);
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 15384c5f1c..89e0bad4d0 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -982,7 +982,7 @@ static ASTConsumer* CreateASTConsumer(const std::string& InFile,
AnalyzeSpecificFunction);
case AnalysisLiveVariables:
- return CreateLiveVarAnalyzer();
+ return CreateLiveVarAnalyzer(AnalyzeSpecificFunction);
case WarnDeadStores:
return CreateDeadStoreChecker(Diag);