Skip to content

Commit 3a84826

Browse files
committed
[rebase] Do not pass return type in call to void function
llvm::CallOp verifier now makes it an error: "calling function with void result must not produce values" llvm@c1f719d
1 parent 9036735 commit 3a84826

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Optimizer/CodeGen/CodeGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ struct FreeMemOpConversion : public FIROpConversion<fir::FreeMemOp> {
495495
freemem.getLoc(), voidPtrTy(), operands[0]);
496496
freemem->setAttr("callee", mlir::SymbolRefAttr::get(freeFunc));
497497
rewriter.create<mlir::LLVM::CallOp>(
498-
loc, mlir::LLVM::LLVMVoidType::get(freemem.getContext()),
498+
loc, mlir::TypeRange{},
499499
mlir::ValueRange{bitcast}, freemem->getAttrs());
500500
rewriter.eraseOp(freemem);
501501
return success();

0 commit comments

Comments
 (0)