mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Concurrency] Correct memory effect attributes of task_create
Without this, llvm would sometimes wrongly assume there's no indirect accesses and the optimizations can lead to a runtime crash, by optimizing away initializing options properly. Resolves rdar://152548190
This commit is contained in:
@@ -2376,7 +2376,7 @@ FUNCTION(TaskCreate,
|
||||
RefCountedPtrTy),
|
||||
ATTRS(NoUnwind),
|
||||
EFFECT(RuntimeEffect::Concurrency),
|
||||
MEMEFFECTS(ArgMemOnly))
|
||||
MEMEFFECTS(ReadOnly))
|
||||
|
||||
// void swift_task_switch(AsyncContext *resumeContext,
|
||||
// TaskContinuationFunction *resumeFunction,
|
||||
|
||||
Reference in New Issue
Block a user