Skip to content

Commit 6647cfd

Browse files
[SYCL] Fix macro definition conflicting with MSVC (intel#6798)
The _CONCAT macro is defined in MSVC headers so to avoid redefinition warnings this commit changes the naming in the PI mock plugin from _CONCAT to _PI_MOCK_PLUGIN_CONCAT. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent 398571a commit 6647cfd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sycl/unittests/helpers/PiMockPlugin.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -899,15 +899,15 @@ inline pi_result mock_piPluginGetLastError(char **message) {
899899
return PI_SUCCESS;
900900
}
901901

902-
#define _CONCAT(A, B) A##B
903-
#define CONCAT(A, B) _CONCAT(A, B)
902+
#define _PI_MOCK_PLUGIN_CONCAT(A, B) A##B
903+
#define PI_MOCK_PLUGIN_CONCAT(A, B) _PI_MOCK_PLUGIN_CONCAT(A, B)
904904

905905
inline pi_plugin::FunctionPointers getMockedFunctionPointers() {
906906
return {
907-
#define _PI_API(api) CONCAT(mock_, api),
907+
#define _PI_API(api) PI_MOCK_PLUGIN_CONCAT(mock_, api),
908908
#include <sycl/detail/pi.def>
909909
};
910910
}
911911

912-
#undef CONCAT
913-
#undef _CONCAT
912+
#undef PI_MOCK_PLUGIN_CONCAT
913+
#undef _PI_MOCK_PLUGIN_CONCAT

0 commit comments

Comments
 (0)