Skip to content

Commit 8bb5b65

Browse files
committed
[mlir:ExecutionEngine] Update use of getAddress now that lookup returns ExecutorAddr
This was changed in 16dcbb5
1 parent b6388e4 commit 8bb5b65

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

mlir/lib/ExecutionEngine/ExecutionEngine.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,9 @@ Expected<void *> ExecutionEngine::lookup(StringRef name) const {
360360
return makeStringError(os.str());
361361
}
362362

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;
363+
if (void *fptr = expectedSymbol->toPtr<void *>())
364+
return fptr;
365+
return makeStringError("looked up function is null");
368366
}
369367

370368
Error ExecutionEngine::invokePacked(StringRef name,

0 commit comments

Comments
 (0)