diff options
| author | John McCall <rjmccall@apple.com> | 2019-08-14 03:54:25 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2019-08-14 03:54:25 +0000 |
| commit | a318c5507348bfc4788310747b7498848de24c42 (patch) | |
| tree | 516c0e5e5922e5d87697fa6012c78cf5e83c4aba /llvm/lib/Transforms | |
| parent | 3bbf207fbc56d982d17a5e111f56dbdc4f743774 (diff) | |
| download | bcm5719-llvm-a318c5507348bfc4788310747b7498848de24c42.tar.gz bcm5719-llvm-a318c5507348bfc4788310747b7498848de24c42.zip | |
Coroutines: adjust for SVN r358739
CallSite has been removed in favour of CallBase. Adjust the coroutine split to
account for that.
llvm-svn: 368798
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Coroutines/CoroSplit.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Coroutines/CoroSplit.cpp b/llvm/lib/Transforms/Coroutines/CoroSplit.cpp index f7d40a3be42..e091928609f 100644 --- a/llvm/lib/Transforms/Coroutines/CoroSplit.cpp +++ b/llvm/lib/Transforms/Coroutines/CoroSplit.cpp @@ -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); + } } } |

