<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/offload/unittests/OffloadAPI/device_code/noargs.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Offload][UnitTests] Build device code as C++ (#151714)</title>
<updated>2025-08-04T12:00:51+00:00</updated>
<author>
<name>Leandro Lacerda</name>
<email>leandrolcampos@yahoo.com.br</email>
</author>
<published>2025-08-04T12:00:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f1eb869bae2ab86726ee3a5a5c7980d5b2acbd5d'/>
<id>f1eb869bae2ab86726ee3a5a5c7980d5b2acbd5d</id>
<content type='text'>
This commit refactors the `add_offload_test_device_code` CMake function
to compile device code using the C++ compiler (`CMAKE_CXX_COMPILER`)
instead of the C compiler.

This change enables the use of C++ features, such as templates, within
device-side test kernels. This will allow for more advanced and reusable
kernel wrappers, reducing boilerplate code in the conformance test
suite.

As part of this change:
- All `.c` files for device code in `unittests/` have been renamed to
`.cpp`.
- Kernel definitions are now wrapped in `extern "C"` to ensure C linkage
and prevent name mangling.

This change affects the `OffloadAPI` and `Conformance` test suites.

cc @callumfare @RossBrunton @jhuber6</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit refactors the `add_offload_test_device_code` CMake function
to compile device code using the C++ compiler (`CMAKE_CXX_COMPILER`)
instead of the C compiler.

This change enables the use of C++ features, such as templates, within
device-side test kernels. This will allow for more advanced and reusable
kernel wrappers, reducing boilerplate code in the conformance test
suite.

As part of this change:
- All `.c` files for device code in `unittests/` have been renamed to
`.cpp`.
- Kernel definitions are now wrapped in `extern "C"` to ensure C linkage
and prevent name mangling.

This change affects the `OffloadAPI` and `Conformance` test suites.

cc @callumfare @RossBrunton @jhuber6</pre>
</div>
</content>
</entry>
</feed>
