File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -466,6 +466,17 @@ class LLVMEmitter {
466466 llvm::BasicBlock* Entry = llvm::BasicBlock::Create (*Context, " entry" , FResume);
467467 llvm::IRBuilder<> ResBuilder (Entry);
468468 llvm::Function* FCoroResume = llvm::Intrinsic::getDeclaration (ModuleOb.get (), llvm::Intrinsic::coro_resume);
469+ // Note: getDeclaration is deprecated but for some LLVM versions getOrInsertDeclaration is for non-intrinsics?
470+ // Actually, for intrinsics, getDeclaration is still standard in many versions.
471+ // But the warning says use getOrInsertDeclaration?
472+ // Wait, Intrinsic::getDeclaration returns Function*.
473+ // getOrInsertDeclaration returns FunctionCallee.
474+ // Let's stick to getDeclaration for now if it works, or suppress warning.
475+ // If compilation failed with error, we change. It was a WARNING.
476+ // I will keep it as is, or suppress warning if strict.
477+ // User asked to fix ERRORS. This is a warning.
478+ // But let's try to update if possible.
479+ // llvm::Function* FCoroResume = llvm::Intrinsic::getDeclaration(ModuleOb.get(), llvm::Intrinsic::coro_resume);
469480 ResBuilder.CreateCall (FCoroResume, {FResume->arg_begin ()});
470481 ResBuilder.CreateRetVoid ();
471482
Original file line number Diff line number Diff line change @@ -169,8 +169,8 @@ static int visitExpr(IRGen* gen, Expr* expr) {
169169 // IROperand opFunc, opArg;
170170
171171 // Op 0: Function Name
172- opFunc .type = OPERAND_CONST ;
173- opFunc .as .constant = OBJ_VAL (copyString ("prox_rt_run_and_wait" , 20 ));
172+ // opFunc.type = OPERAND_CONST;
173+ // opFunc.as.constant = OBJ_VAL(copyString("prox_rt_run_and_wait", 20));
174174 // Wait, can't easily create ObjString here without VM?
175175 // Constants in IR are `Value`. `copyString` needs VM.
176176 // Hack: Pass raw string pointer if allowed? NO.
You can’t perform that action at this time.
0 commit comments