[llvm] [Offload] Implement 'olIsValidBinary' in offload and clean up (PR #159658)

Ross Brunton via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 03:23:42 PDT 2025


================
@@ -0,0 +1,26 @@
+//===------- Offload API tests - olIsValidBinary --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "../common/Fixtures.hpp"
+#include <OffloadAPI.h>
+#include <gtest/gtest.h>
+
+using olIsValidBinaryTest = OffloadDeviceTest;
----------------
RossBrunton wrote:

Can we have tests for:
* Validating an invalid binary.
* Passing nullptr for the device handle and the buffer.
* Passing a size of 0 (which I think should error?)

https://github.com/llvm/llvm-project/pull/159658


More information about the llvm-commits mailing list