[cfe-commits] r123602 - in /cfe/trunk: include/clang/Analysis/AnalysisContext.h lib/Analysis/AnalysisContext.cpp
Anders Carlsson
andersca at mac.com
Sun Jan 16 14:05:24 PST 2011
Author: andersca
Date: Sun Jan 16 16:05:23 2011
New Revision: 123602
URL: http://llvm.org/viewvc/llvm-project?rev=123602&view=rev
Log:
Add AnalysisContext::dumpCFG.
Modified:
cfe/trunk/include/clang/Analysis/AnalysisContext.h
cfe/trunk/lib/Analysis/AnalysisContext.cpp
Modified: cfe/trunk/include/clang/Analysis/AnalysisContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/AnalysisContext.h?rev=123602&r1=123601&r2=123602&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/AnalysisContext.h (original)
+++ cfe/trunk/include/clang/Analysis/AnalysisContext.h Sun Jan 16 16:05:23 2011
@@ -91,10 +91,12 @@
Stmt *getBody();
CFG *getCFG();
-
+
/// Return a version of the CFG without any edges pruned.
CFG *getUnoptimizedCFG();
+ void dumpCFG();
+
ParentMap &getParentMap();
PseudoConstantAnalysis *getPseudoConstantAnalysis();
LiveVariables *getLiveVariables();
Modified: cfe/trunk/lib/Analysis/AnalysisContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/AnalysisContext.cpp?rev=123602&r1=123601&r2=123602&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/AnalysisContext.cpp (original)
+++ cfe/trunk/lib/Analysis/AnalysisContext.cpp Sun Jan 16 16:05:23 2011
@@ -86,6 +86,10 @@
return completeCFG;
}
+void AnalysisContext::dumpCFG() {
+ getCFG()->dump(getASTContext().getLangOptions());
+}
+
ParentMap &AnalysisContext::getParentMap() {
if (!PM)
PM = new ParentMap(getBody());
More information about the cfe-commits
mailing list