forked from OSchip/llvm-project
Coroutines: adjust for SVN r358739
CallSite has been removed in favour of CallBase. Adjust the coroutine split to account for that. llvm-svn: 368798
This commit is contained in:
parent
3bbf207fbc
commit
a318c55073
|
@ -1549,10 +1549,12 @@ static void replacePrepare(CallInst *Prepare, CallGraph &CG) {
|
|||
// If so, we'll need to update the call graph.
|
||||
if (PrepareUserNode) {
|
||||
for (auto &Use : Cast->uses()) {
|
||||
auto CS = CallSite(Use.getUser());
|
||||
if (!CS || !CS.isCallee(&Use)) continue;
|
||||
PrepareUserNode->removeCallEdgeFor(CS);
|
||||
PrepareUserNode->addCalledFunction(CS, FnNode);
|
||||
if (auto *CB = dyn_cast<CallBase>(Use.getUser())) {
|
||||
if (!CB->isCallee(&Use))
|
||||
continue;
|
||||
PrepareUserNode->removeCallEdgeFor(*CB);
|
||||
PrepareUserNode->addCalledFunction(CB, FnNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue