aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-15 05:40:35 +0000
committerChris Lattner <sabre@nondot.org>2009-09-15 05:40:35 +0000
commit69177fbaef43d051fcc9a84184b2884f41765c6b (patch)
tree66ec9d3d0df0527cbad15e8a2b07a7826b6ea039 /include/llvm
parent5957ef5d5226035be8d48b37260bcef1b171a288 (diff)
downloadexternal_llvm-69177fbaef43d051fcc9a84184b2884f41765c6b.zip
external_llvm-69177fbaef43d051fcc9a84184b2884f41765c6b.tar.gz
external_llvm-69177fbaef43d051fcc9a84184b2884f41765c6b.tar.bz2
add a new CallGraphNode::replaceCallEdge method and use it from
argpromote to avoid invalidating an iterator. This fixes PR4977. All clang tests now pass with expensive checking (on my system at least). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/CallGraph.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h
index 1d23c69..bcb6dee 100644
--- a/include/llvm/Analysis/CallGraph.h
+++ b/include/llvm/Analysis/CallGraph.h
@@ -270,6 +270,12 @@ public:
/// removeOneAbstractEdgeTo - Remove one edge associated with a null callsite
/// from this node to the specified callee function.
void removeOneAbstractEdgeTo(CallGraphNode *Callee);
+
+ /// replaceCallEdge - This method replaces the edge in the node for the
+ /// specified call site with a new one. Note that this method takes linear
+ /// time, so it should be used sparingly.
+ void replaceCallEdge(CallSite CS, CallSite NewCS, CallGraphNode *NewNode);
+
};
//===----------------------------------------------------------------------===//