Skip to content

Commit 1acbafe

Browse files
committed
LLVMCoroutine: Fix uninitialized local in resume
1 parent bb27299 commit 1acbafe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/internal/llvm/llvmcoroutine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ llvm::Value *LLVMCoroutine::createResume(llvm::Module *module, llvm::IRBuilder<>
112112

113113
llvm::Value *ret = builder->CreateAlloca(builder->getInt1Ty());
114114
llvm::Value *done = builder->CreateCall(coroDone, { coroHandle });
115-
done = builder->CreateCall(coroDone, { coroHandle });
115+
builder->CreateStore(done, ret);
116116

117117
llvm::BasicBlock *destroyBranch = llvm::BasicBlock::Create(ctx, "", function);
118118
llvm::BasicBlock *resumeBranch = llvm::BasicBlock::Create(ctx, "", function);

0 commit comments

Comments
 (0)