Skip to content

Commit 9813e94

Browse files
committed
IRGen: Use CallEmission to emit dispatch thunks
This increases the level of abstraction a bit and makes it easier to stage in the requisite support for async method calls. For now, I've kept the existing, incomplete logic for those. Part of rdar://problem/73625623.
1 parent c79de40 commit 9813e94

File tree

2 files changed

+275
-76
lines changed

2 files changed

+275
-76
lines changed

Diff for: lib/IRGen/CallEmission.h

+7
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ class CallEmission {
103103
bool isOutlined);
104104
void emitToExplosion(Explosion &out, bool isOutlined);
105105

106+
llvm::CallInst *emitCoroutineAsOrdinaryFunction() {
107+
assert(IsCoroutine);
108+
IsCoroutine = false;
109+
110+
return emitCallSite();
111+
}
112+
106113
TemporarySet claimTemporaries() {
107114
// Move the actual temporary set out.
108115
auto result = std::move(Temporaries);

0 commit comments

Comments
 (0)