diff --git a/include/llvm/Analysis/DSGraph.h b/include/llvm/Analysis/DSGraph.h index 14d46a84bb2..7a7f4b1b5bd 100644 --- a/include/llvm/Analysis/DSGraph.h +++ b/include/llvm/Analysis/DSGraph.h @@ -423,7 +423,13 @@ public: /// site into the nodes reachable from DestCS. void mergeCallSite(const DSCallSite &DestCS, const DSCallSite &SrcCS); - bool clonedNode() const { return !NodeMap.empty(); } + bool clonedAnyNodes() const { return !NodeMap.empty(); } + + /// hasClonedNode - Return true if the specified node has been cloned from + /// the source graph into the destination graph. + bool hasClonedNode(const DSNode *N) { + return NodeMap.count(N); + } void destroy() { NodeMap.clear(); } }; diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h index 14d46a84bb2..7a7f4b1b5bd 100644 --- a/include/llvm/Analysis/DataStructure/DSGraph.h +++ b/include/llvm/Analysis/DataStructure/DSGraph.h @@ -423,7 +423,13 @@ public: /// site into the nodes reachable from DestCS. void mergeCallSite(const DSCallSite &DestCS, const DSCallSite &SrcCS); - bool clonedNode() const { return !NodeMap.empty(); } + bool clonedAnyNodes() const { return !NodeMap.empty(); } + + /// hasClonedNode - Return true if the specified node has been cloned from + /// the source graph into the destination graph. + bool hasClonedNode(const DSNode *N) { + return NodeMap.count(N); + } void destroy() { NodeMap.clear(); } };