Skip to content

Commit

Permalink
Merge pull request swiftlang#74192 from drexin/wip-typed-throws-abi
Browse files Browse the repository at this point in the history
[IRGen] Return typed errors directly in synchronous functions when po…
  • Loading branch information
drexin committed Jun 22, 2024
2 parents c3b57f2 + 3d4163a commit 35b2b71
Show file tree
Hide file tree
Showing 11 changed files with 523 additions and 91 deletions.
6 changes: 6 additions & 0 deletions lib/IRGen/CallEmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "Address.h"
#include "Callee.h"
#include "Explosion.h"
#include "Temporary.h"

namespace llvm {
Expand Down Expand Up @@ -88,6 +89,7 @@ class CallEmission {

unsigned IndirectTypedErrorArgIdx = 0;

std::optional<Explosion> typedErrorExplosion;

virtual void setFromCallee();
void emitToUnmappedMemory(Address addr);
Expand Down Expand Up @@ -123,6 +125,10 @@ class CallEmission {
return CurCallee.getSubstitutions();
}

std::optional<Explosion> &getTypedErrorExplosion() {
return typedErrorExplosion;
}

virtual void begin();
virtual void end();
virtual SILType getParameterType(unsigned index) = 0;
Expand Down
Loading

0 comments on commit 35b2b71

Please sign in to comment.