Skip to content

[SYCL] Fix macro definition conflicting with MSVC #6798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sycl/unittests/helpers/PiMockPlugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,15 +899,15 @@ inline pi_result mock_piPluginGetLastError(char **message) {
return PI_SUCCESS;
}

#define _CONCAT(A, B) A##B
#define CONCAT(A, B) _CONCAT(A, B)
#define _PI_MOCK_PLUGIN_CONCAT(A, B) A##B
#define PI_MOCK_PLUGIN_CONCAT(A, B) _PI_MOCK_PLUGIN_CONCAT(A, B)

inline pi_plugin::FunctionPointers getMockedFunctionPointers() {
return {
#define _PI_API(api) CONCAT(mock_, api),
#define _PI_API(api) PI_MOCK_PLUGIN_CONCAT(mock_, api),
#include <sycl/detail/pi.def>
};
}

#undef CONCAT
#undef _CONCAT
#undef PI_MOCK_PLUGIN_CONCAT
#undef _PI_MOCK_PLUGIN_CONCAT