Skip to content

Commit 0c2b227

Browse files
authored
[SYCL] Cleanup exception class ABI entry points (#20677)
1 parent 8ab28e0 commit 0c2b227

File tree

5 files changed

+4
-68
lines changed

5 files changed

+4
-68
lines changed

sycl/include/sycl/exception.hpp

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ __SYCL_EXPORT std::error_code make_error_code(sycl::errc E) noexcept;
5151
__SYCL_EXPORT const std::error_category &sycl_category() noexcept;
5252

5353
namespace detail {
54-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
55-
__SYCL_EXPORT const char *stringifyErrorCode(int32_t error);
56-
57-
inline std::string codeToString(int32_t code) {
58-
return std::to_string(code) + " (" + std::string(stringifyErrorCode(code)) +
59-
")";
60-
}
61-
#endif
6254

6355
class __SYCL_EXPORT SYCLCategory : public std::error_category {
6456
public:
@@ -82,34 +74,21 @@ class __SYCL_EXPORT exception : public virtual std::exception {
8274
virtual ~exception();
8375

8476
exception(std::error_code Ec, const char *Msg)
85-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
86-
: exception(Ec, nullptr, Msg) {}
87-
#endif
88-
;
77+
: exception(Ec, nullptr, Msg) {};
8978

9079
exception(std::error_code Ec, const std::string &Msg)
9180
: exception(Ec, nullptr, Msg.c_str()) {}
9281

93-
exception(std::error_code Ec)
94-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
95-
: exception(Ec, nullptr, "") {}
96-
#endif
97-
;
82+
exception(std::error_code Ec) : exception(Ec, nullptr, "") {};
9883

9984
exception(int EV, const std::error_category &ECat, const std::string &WhatArg)
10085
: exception(std::error_code(EV, ECat), nullptr, WhatArg.c_str()) {}
10186

10287
exception(int EV, const std::error_category &ECat, const char *WhatArg)
103-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
104-
: exception(std::error_code(EV, ECat), nullptr, WhatArg) {}
105-
#endif
106-
;
88+
: exception(std::error_code(EV, ECat), nullptr, WhatArg) {};
10789

10890
exception(int EV, const std::error_category &ECat)
109-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
110-
: exception(std::error_code(EV, ECat), nullptr, "") {}
111-
#endif
112-
;
91+
: exception(std::error_code(EV, ECat), nullptr, "") {};
11392

11493
// context.hpp depends on exception.hpp but we can't define these ctors in
11594
// exception.hpp while context is still an incomplete type.
@@ -140,17 +119,6 @@ class __SYCL_EXPORT exception : public virtual std::exception {
140119
std::error_code MErrC = make_error_code(sycl::errc::invalid);
141120

142121
protected:
143-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
144-
// base constructors used by SYCL 1.2.1 exception subclasses
145-
exception(std::error_code Ec, const char *Msg, const int32_t PIErr)
146-
: exception(Ec, std::string(Msg), PIErr) {}
147-
148-
exception(std::error_code Ec, const std::string &Msg, const int32_t URErr)
149-
: exception(Ec, nullptr, Msg + " " + detail::codeToString(URErr)) {
150-
MErr = URErr;
151-
}
152-
#endif
153-
154122
// base constructor for all SYCL 2020 constructors
155123
// exception(context *, std::error_code, const std::string);
156124
exception(std::error_code Ec, std::shared_ptr<context> SharedPtrCtx,

sycl/source/detail/ur.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,12 @@ enum class backend : char;
2828
namespace detail {
2929
class adapter_impl;
3030

31-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
32-
__SYCL_EXPORT
33-
#endif
3431
const char *stringifyErrorCode(int32_t error);
3532

36-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
3733
inline std::string codeToString(int32_t code) {
3834
return std::to_string(code) + " (" + std::string(stringifyErrorCode(code)) +
3935
")";
4036
}
41-
#endif
4237

4338
namespace ur {
4439
void *getURLoaderLibrary();

sycl/source/exception.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@
1717
namespace sycl {
1818
inline namespace _V1 {
1919

20-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
21-
exception::exception(std::error_code EC, const char *Msg)
22-
: exception(EC, nullptr, Msg) {}
23-
24-
// new SYCL 2020 constructors
25-
exception::exception(std::error_code EC) : exception(EC, nullptr, "") {}
26-
27-
exception::exception(int EV, const std::error_category &ECat,
28-
const char *WhatArg)
29-
: exception({EV, ECat}, nullptr, std::string(WhatArg)) {}
30-
31-
exception::exception(int EV, const std::error_category &ECat)
32-
: exception({EV, ECat}, nullptr, "") {}
33-
#endif
34-
3520
// protected base constructor for all SYCL 2020 constructors
3621
exception::exception(std::error_code EC, std::shared_ptr<context> SharedPtrCtx,
3722
const char *WhatArg)

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,6 @@ _ZN4sycl3_V16detail17reduComputeWGSizeEmmRm
33213321
_ZN4sycl3_V16detail18get_kernel_id_implENS1_11string_viewE
33223322
_ZN4sycl3_V16detail18make_kernel_bundleEmRKNS0_7contextENS0_12bundle_stateENS0_7backendE
33233323
_ZN4sycl3_V16detail18make_kernel_bundleEmRKNS0_7contextEbNS0_12bundle_stateENS0_7backendE
3324-
_ZN4sycl3_V16detail18stringifyErrorCodeEi
33253324
_ZN4sycl3_V16detail19getDeviceKernelInfoERKNS1_27compile_time_kernel_info_v123CompileTimeKernelInfoTyE
33263325
_ZN4sycl3_V16detail19kernel_bundle_plain21ext_oneapi_get_kernelENS1_11string_viewE
33273326
_ZN4sycl3_V16detail19kernel_bundle_plain21ext_oneapi_has_kernelENS1_11string_viewE
@@ -3673,16 +3672,8 @@ _ZN4sycl3_V18platformC2EP15_cl_platform_id
36733672
_ZN4sycl3_V18platformC2ERKNS0_15device_selectorE
36743673
_ZN4sycl3_V18platformC2ERKNS0_6deviceE
36753674
_ZN4sycl3_V18platformC2Ev
3676-
_ZN4sycl3_V19exceptionC1ESt10error_code
3677-
_ZN4sycl3_V19exceptionC1ESt10error_codePKc
36783675
_ZN4sycl3_V19exceptionC1ESt10error_codeSt10shared_ptrINS0_7contextEEPKc
3679-
_ZN4sycl3_V19exceptionC1EiRKNSt3_V214error_categoryE
3680-
_ZN4sycl3_V19exceptionC1EiRKNSt3_V214error_categoryEPKc
3681-
_ZN4sycl3_V19exceptionC2ESt10error_code
3682-
_ZN4sycl3_V19exceptionC2ESt10error_codePKc
36833676
_ZN4sycl3_V19exceptionC2ESt10error_codeSt10shared_ptrINS0_7contextEEPKc
3684-
_ZN4sycl3_V19exceptionC2EiRKNSt3_V214error_categoryE
3685-
_ZN4sycl3_V19exceptionC2EiRKNSt3_V214error_categoryEPKc
36863677
_ZN4sycl3_V19exceptionD0Ev
36873678
_ZN4sycl3_V19exceptionD1Ev
36883679
_ZN4sycl3_V19exceptionD2Ev

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,6 @@
382382
??0event@_V1@sycl@@QEAA@AEBV012@@Z
383383
??0event@_V1@sycl@@QEAA@PEAU_cl_event@@AEBVcontext@12@@Z
384384
??0event@_V1@sycl@@QEAA@XZ
385-
??0exception@_V1@sycl@@IEAA@Verror_code@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@H@Z
386-
??0exception@_V1@sycl@@IEAA@Verror_code@std@@PEBDH@Z
387385
??0exception@_V1@sycl@@IEAA@Verror_code@std@@V?$shared_ptr@Vcontext@_V1@sycl@@@4@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@@Z
388386
??0exception@_V1@sycl@@IEAA@Verror_code@std@@V?$shared_ptr@Vcontext@_V1@sycl@@@4@PEBD@Z
389387
??0exception@_V1@sycl@@QEAA@AEBV012@@Z
@@ -4473,7 +4471,6 @@
44734471
?start_fusion@fusion_wrapper@experimental@codeplay@ext@_V1@sycl@@QEAAXXZ
44744472
?storeRawArg@handler@_V1@sycl@@AEAAPEAXAEBVraw_kernel_arg@experimental@oneapi@ext@23@@Z
44754473
?storeRawArg@handler@_V1@sycl@@AEAAPEAXPEBX_K@Z
4476-
?stringifyErrorCode@detail@_V1@sycl@@YAPEBDH@Z
44774474
?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@AEBUcode_location@detail@23@@Z
44784475
?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@AEBUcode_location@detail@23@_N@Z
44794476
?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@V123@AEBUcode_location@detail@23@@Z

0 commit comments

Comments
 (0)