We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6388e4 commit 8bb5b65Copy full SHA for 8bb5b65
mlir/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -360,11 +360,9 @@ Expected<void *> ExecutionEngine::lookup(StringRef name) const {
360
return makeStringError(os.str());
361
}
362
363
- auto rawFPtr = expectedSymbol->getAddress();
364
- auto *fptr = reinterpret_cast<void *>(rawFPtr);
365
- if (!fptr)
366
- return makeStringError("looked up function is null");
367
- return fptr;
+ if (void *fptr = expectedSymbol->toPtr<void *>())
+ return fptr;
+ return makeStringError("looked up function is null");
368
369
370
Error ExecutionEngine::invokePacked(StringRef name,
0 commit comments