Skip to content

Commit 8bd2812

Browse files
committed
Store an ExecutorRef within an executor option.
ExecutorRefs are a (pointer, witness table) pair that are meant to be passed around. We don't need to form a reference to one because they are ABI already.
1 parent 62caff6 commit 8bd2812

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/swift/ABI/TaskOptions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ class TaskGroupTaskOptionRecord : public TaskOptionRecord {
8080
/// executor should be used instead, most often this may mean the global
8181
/// concurrent executor, or the enclosing actor's executor.
8282
class ExecutorTaskOptionRecord : public TaskOptionRecord {
83-
ExecutorRef *Executor;
83+
ExecutorRef Executor;
8484

8585
public:
86-
ExecutorTaskOptionRecord(ExecutorRef *executor)
86+
ExecutorTaskOptionRecord(ExecutorRef executor)
8787
: TaskOptionRecord(TaskOptionRecordKind::Executor),
8888
Executor(executor) {}
8989

90-
ExecutorRef *getExecutor() const {
90+
ExecutorRef getExecutor() const {
9191
return Executor;
9292
}
9393
};

0 commit comments

Comments
 (0)