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
This commit is contained in:
Chris Lattner 2005-03-21 09:39:51 +00:00
parent 38d807ea8b
commit 3f90a94c5d

View File

@ -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)));
}