Changes in directory llvm/tools/analyze:
AnalysisWrappers.cpp updated: 1.16 - 1.17
---
Log message:
Fix test/Regression/Other/2002-01-31-CallGraph.ll after the recent callgraph
rework.
---
Diffs of the changes: (+17 -3)
AnalysisWrappers.cpp | 20 +---
1 files changed, 17 insertions(+), 3 deletions(-)
Index: llvm/tools/analyze/AnalysisWrappers.cpp
diff -u llvm/tools/analyze/AnalysisWrappers.cpp:1.16
llvm/tools/analyze/AnalysisWrappers.cpp:1.17
--- llvm/tools/analyze/AnalysisWrappers.cpp:1.16Thu Apr 21 18:59:21 2005
+++ llvm/tools/analyze/AnalysisWrappers.cpp Thu Dec 22 13:26:06 2005
@@ -20,6 +20,7 @@
#include llvm/Module.h
#include llvm/Pass.h
#include llvm/Support/CallSite.h
+#include llvm/Analysis/CallGraph.h
#include iostream
using namespace llvm;
@@ -55,13 +56,26 @@
return false;
}
-void print(std::ostream OS) const {}
-
virtual void getAnalysisUsage(AnalysisUsage AU) const {
AU.setPreservesAll();
}
};
RegisterAnalysisExternalFunctionsPassedConstants
- P2(externalfnconstants, Print external fn callsites passed constants);
+ P1(externalfnconstants, Print external fn callsites passed constants);
+
+ struct CallGraphPrinter : public ModulePass {
+virtual void getAnalysisUsage(AnalysisUsage AU) const {
+ AU.setPreservesAll();
+ AU.addRequiredCallGraph();
+}
+virtual bool runOnModule(Module M) { return false; }
+
+void print(std::ostream OS, Module *M) const {
+ getAnalysisCallGraph().print(OS, M);
+}
+ };
+
+ RegisterAnalysisCallGraphPrinter
+P2(callgraph, Print a call graph);
}
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits