Skip to content

Commit 62192a6

Browse files
authored
[SYCL] Improve kernel demangling in graph printing (#2282)
Update demangling to work when toolchain is built with Clang. Signed-off-by: Alexander Batashev <[email protected]>
1 parent 7b7bab6 commit 62192a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sycl/source/detail/scheduler/commands.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@
3030
#include <string>
3131
#include <vector>
3232

33-
#ifdef __GNUG__
33+
#ifdef __has_include
34+
#if __has_include(<cxxabi.h>)
35+
#define __SYCL_ENABLE_GNU_DEMANGLING
3436
#include <cstdlib>
3537
#include <cxxabi.h>
3638
#include <memory>
3739
#endif
40+
#endif
3841

3942
#ifdef XPTI_ENABLE_INSTRUMENTATION
4043
#include "xpti_trace_framework.hpp"
@@ -49,7 +52,7 @@ namespace detail {
4952
extern xpti::trace_event_data_t *GSYCLGraphEvent;
5053
#endif
5154

52-
#ifdef __GNUG__
55+
#ifdef __SYCL_ENABLE_GNU_DEMANGLING
5356
struct DemangleHandle {
5457
char *p;
5558
DemangleHandle(char *ptr) : p(ptr) {}

0 commit comments

Comments
 (0)