From 3f90a94c5dcb2fe1aae705f66684b3902f5ec8d6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 21 Mar 2005 09:39:51 +0000 Subject: [PATCH] The reachability cloner should add arguments to merged calls when the RHS of the merge has more operands than the LHS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20731 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/DataStructure.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index ed7fa9ac4f0..87163860cc1 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -1087,7 +1087,7 @@ void ReachabilityCloner::merge(const DSNodeHandle &NH, /// mergeCallSite - Merge the nodes reachable from the specified src call /// site into the nodes reachable from DestCS. -void ReachabilityCloner::mergeCallSite(const DSCallSite &DestCS, +void ReachabilityCloner::mergeCallSite(DSCallSite &DestCS, const DSCallSite &SrcCS) { merge(DestCS.getRetVal(), SrcCS.getRetVal()); unsigned MinArgs = DestCS.getNumPtrArgs(); @@ -1095,6 +1095,9 @@ void ReachabilityCloner::mergeCallSite(const DSCallSite &DestCS, for (unsigned a = 0; a != MinArgs; ++a) merge(DestCS.getPtrArg(a), SrcCS.getPtrArg(a)); + + for (unsigned a = MinArgs, e = SrcCS.getNumPtrArgs(); a != e; ++a) + DestCS.addPtrArg(getClonedNH(SrcCS.getPtrArg(a))); }