[Mlir-commits] [mlir] [mlir] Fix conflict of user defined reserved functions with internal prototypes (PR #123378)
Christian Ulmann
llvmlistbot at llvm.org
Fri Jan 24 01:58:25 PST 2025
================
@@ -80,10 +82,13 @@ std::tuple<Value, Value> AllocationOpLLVMLowering::allocateBufferManuallyAlign(
<< " to integer address space "
"failed. Consider adding memory space conversions.";
}
- LLVM::LLVMFuncOp allocFuncOp = getNotalignedAllocFn(
+ FailureOr<LLVM::LLVMFuncOp> allocFuncOp = getNotalignedAllocFn(
getTypeConverter(), op->getParentWithTrait<OpTrait::SymbolTable>(),
getIndexType());
- auto results = rewriter.create<LLVM::CallOp>(loc, allocFuncOp, sizeBytes);
+ if (failed(allocFuncOp))
+ return std::make_tuple(Value(), Value());
----------------
Dinistro wrote:
Will this result in a crash later on? If so, this would also require a FailureOr wrapping.
https://github.com/llvm/llvm-project/pull/123378
More information about the Mlir-commits
mailing list