Skip to content

Commit 0d7054b

Browse files
authored
Merge pull request #76630 from drexin/wip-135954459
[IRGen] Reintroduce typed throws ABI
2 parents 4ea0c9b + f6e7c16 commit 0d7054b

15 files changed

+5800
-169
lines changed

lib/IRGen/CallEmission.h

Lines changed: 11 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 {
@@ -90,6 +91,7 @@ class CallEmission {
9091

9192
unsigned IndirectTypedErrorArgIdx = 0;
9293

94+
std::optional<Explosion> typedErrorExplosion;
9395

9496
virtual void setFromCallee();
9597
void emitToUnmappedMemory(Address addr);
@@ -110,6 +112,11 @@ class CallEmission {
110112
TemporarySet &temporaries,
111113
bool isOutlined);
112114

115+
bool mayReturnTypedErrorDirectly() const;
116+
void emitToUnmappedExplosionWithDirectTypedError(SILType resultType,
117+
llvm::Value *result,
118+
Explosion &out);
119+
113120
CallEmission(IRGenFunction &IGF, llvm::Value *selfValue, Callee &&callee)
114121
: IGF(IGF), selfValue(selfValue), CurCallee(std::move(callee)) {}
115122

@@ -129,6 +136,10 @@ class CallEmission {
129136
UseProfilingThunk = true;
130137
}
131138

139+
std::optional<Explosion> &getTypedErrorExplosion() {
140+
return typedErrorExplosion;
141+
}
142+
132143
virtual void begin();
133144
virtual void end();
134145
virtual SILType getParameterType(unsigned index) = 0;

0 commit comments

Comments
 (0)