[llvm] [libsycl] Add constructors for context (PR #214538)

Kseniya Tikhomirova via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 10:47:25 PDT 2026


================
@@ -18,6 +18,8 @@ void dummyAsyncHandler(exception_list) {}
 TEST(Context, DefaultConstructor) {
   mock::MockWrapper Mock;
 
+  // This line triggers lazy platform discovery, which we want to suppress
+  // from the expected calls of the mock lib.
   // TODO: remove once context is properly implemented
----------------
KseniyaTikhomirova wrote:

I would actually explain the purpose of device allocation directly. 
something like what you put to the comment to PR:

// Platform discovery creates default context that increases the actual number of calls to olCreateContext to 2 in total. Constructing device to exclude default context from counting in further expectations.
// TODO: remove once context is properly implemented. 

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


More information about the llvm-commits mailing list