[llvm] [Offload] Refactor device/platform info queries (PR #146345)
Jan Patrick Lehr via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 05:38:11 PDT 2025
================
@@ -277,35 +277,42 @@ Error olGetPlatformInfoSize_impl(ol_platform_handle_t Platform,
Error olGetDeviceInfoImplDetail(ol_device_handle_t Device,
ol_device_info_t PropName, size_t PropSize,
void *PropValue, size_t *PropSizeRet) {
+ assert(Device != OffloadContext::get().HostDevice());
+ InfoWriter Info(PropSize, PropValue, PropSizeRet);
- ReturnHelper ReturnValue(PropSize, PropValue, PropSizeRet);
+ auto MakeError = [&](ErrorCode Code, StringRef Err) {
----------------
jplehr wrote:
```suggestion
auto makeError = [&](ErrorCode Code, StringRef Err) {
```
Here and later, probably also lower case, as it is technically a function.
https://github.com/llvm/llvm-project/pull/146345
More information about the llvm-commits
mailing list