summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Analysis/DataStructure.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/include/llvm/Analysis/DataStructure.h b/llvm/include/llvm/Analysis/DataStructure.h
index ea1c2ae1922..75a715c5d48 100644
--- a/llvm/include/llvm/Analysis/DataStructure.h
+++ b/llvm/include/llvm/Analysis/DataStructure.h
@@ -39,6 +39,10 @@ public:
virtual bool run(Module &M);
+ bool hasGraph(const Function &F) const {
+ return DSInfo.find(&F) != DSInfo.end();
+ }
+
// getDSGraph - Return the data structure graph for the specified function.
DSGraph &getDSGraph(const Function &F) const {
std::map<const Function*, DSGraph*>::const_iterator I = DSInfo.find(&F);
@@ -74,6 +78,10 @@ public:
virtual bool run(Module &M);
+ bool hasGraph(const Function &F) const {
+ return DSInfo.find(&F) != DSInfo.end();
+ }
+
// getDSGraph - Return the data structure graph for the specified function.
DSGraph &getDSGraph(const Function &F) const {
std::map<const Function*, DSGraph*>::const_iterator I = DSInfo.find(&F);
@@ -94,7 +102,7 @@ public:
AU.addRequired<LocalDataStructures>();
}
private:
- DSGraph &calculateGraph(Function &F);
+ DSGraph &calculateGraph(Function &F, unsigned Indent);
};
@@ -112,6 +120,10 @@ public:
virtual bool run(Module &M);
+ bool hasGraph(const Function &F) const {
+ return DSInfo.find(&F) != DSInfo.end();
+ }
+
// getDSGraph - Return the data structure graph for the specified function.
DSGraph &getDSGraph(const Function &F) const {
std::map<const Function*, DSGraph*>::const_iterator I = DSInfo.find(&F);
OpenPOWER on IntegriCloud