diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index f21d39d8efc3d..77a81657d42ae 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -30,11 +30,14 @@ #include #include -#ifdef __GNUG__ +#ifdef __has_include +#if __has_include() +#define __SYCL_ENABLE_GNU_DEMANGLING #include #include #include #endif +#endif #ifdef XPTI_ENABLE_INSTRUMENTATION #include "xpti_trace_framework.hpp" @@ -49,7 +52,7 @@ namespace detail { extern xpti::trace_event_data_t *GSYCLGraphEvent; #endif -#ifdef __GNUG__ +#ifdef __SYCL_ENABLE_GNU_DEMANGLING struct DemangleHandle { char *p; DemangleHandle(char *ptr) : p(ptr) {}