From 04eeba43040969c05cfcb563195ef5b199297b62 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 16 Jan 2011 22:05:23 +0000 Subject: [PATCH] Add AnalysisContext::dumpCFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123602 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Analysis/AnalysisContext.h | 4 +++- lib/Analysis/AnalysisContext.cpp | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h index 42a5e9f848..2ecbfdc6bf 100644 --- a/include/clang/Analysis/AnalysisContext.h +++ b/include/clang/Analysis/AnalysisContext.h @@ -91,10 +91,12 @@ public: Stmt *getBody(); CFG *getCFG(); - + /// Return a version of the CFG without any edges pruned. CFG *getUnoptimizedCFG(); + void dumpCFG(); + ParentMap &getParentMap(); PseudoConstantAnalysis *getPseudoConstantAnalysis(); LiveVariables *getLiveVariables(); diff --git a/lib/Analysis/AnalysisContext.cpp b/lib/Analysis/AnalysisContext.cpp index 4305507c9c..d9ac1de3d1 100644 --- a/lib/Analysis/AnalysisContext.cpp +++ b/lib/Analysis/AnalysisContext.cpp @@ -86,6 +86,10 @@ CFG *AnalysisContext::getUnoptimizedCFG() { return completeCFG; } +void AnalysisContext::dumpCFG() { + getCFG()->dump(getASTContext().getLangOptions()); +} + ParentMap &AnalysisContext::getParentMap() { if (!PM) PM = new ParentMap(getBody()); -- 2.40.0