Skip to content

Commit 35b2b71

Browse files
authored
Merge pull request #74192 from drexin/wip-typed-throws-abi
[IRGen] Return typed errors directly in synchronous functions when po…
2 parents c3b57f2 + 3d4163a commit 35b2b71

File tree

11 files changed

+523
-91
lines changed

11 files changed

+523
-91
lines changed

lib/IRGen/CallEmission.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "Address.h"
2121
#include "Callee.h"
22+
#include "Explosion.h"
2223
#include "Temporary.h"
2324

2425
namespace llvm {
@@ -88,6 +89,7 @@ class CallEmission {
8889

8990
unsigned IndirectTypedErrorArgIdx = 0;
9091

92+
std::optional<Explosion> typedErrorExplosion;
9193

9294
virtual void setFromCallee();
9395
void emitToUnmappedMemory(Address addr);
@@ -123,6 +125,10 @@ class CallEmission {
123125
return CurCallee.getSubstitutions();
124126
}
125127

128+
std::optional<Explosion> &getTypedErrorExplosion() {
129+
return typedErrorExplosion;
130+
}
131+
126132
virtual void begin();
127133
virtual void end();
128134
virtual SILType getParameterType(unsigned index) = 0;

0 commit comments

Comments
 (0)