[Mlir-commits] [mlir] 8bb5b65 - [mlir:ExecutionEngine] Update use of getAddress now that lookup returns ExecutorAddr
River Riddle
llvmlistbot at llvm.org
Thu May 5 14:25:37 PDT 2022
Author: River Riddle
Date: 2022-05-05T14:24:32-07:00
New Revision: 8bb5b657fec6dc604eeea49e1f26eff4c14084ba
URL: https://github.com/llvm/llvm-project/commit/8bb5b657fec6dc604eeea49e1f26eff4c14084ba
DIFF: https://github.com/llvm/llvm-project/commit/8bb5b657fec6dc604eeea49e1f26eff4c14084ba.diff
LOG: [mlir:ExecutionEngine] Update use of getAddress now that lookup returns ExecutorAddr
This was changed in 16dcbb53dc7968a3752661aac731172ebe0faf64
Added:
Modified:
mlir/lib/ExecutionEngine/ExecutionEngine.cpp
Removed:
################################################################################
diff --git a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp
index 210e52c8797f..cd61a9d5cc73 100644
--- a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -360,11 +360,9 @@ Expected<void *> ExecutionEngine::lookup(StringRef name) const {
return makeStringError(os.str());
}
- auto rawFPtr = expectedSymbol->getAddress();
- auto *fptr = reinterpret_cast<void *>(rawFPtr);
- if (!fptr)
- return makeStringError("looked up function is null");
- return fptr;
+ if (void *fptr = expectedSymbol->toPtr<void *>())
+ return fptr;
+ return makeStringError("looked up function is null");
}
Error ExecutionEngine::invokePacked(StringRef name,
More information about the Mlir-commits
mailing list