Skip to content

Commit ba5cdff

Browse files
authored
[SYCL] Add noexcept for glibcxxassert (#18628)
Signed-off-by: jinge90 <[email protected]>
1 parent 171aa09 commit ba5cdff

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

libdevice/crt_wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void __assert_fail(const char *expr, const char *file, unsigned int line,
133133
namespace std {
134134
DEVICE_EXTERN_CPP
135135
void __glibcxx_assert_fail(const char *file, int line, const char *func,
136-
const char *cond) {
136+
const char *cond) noexcept {
137137
__devicelib_assert_fail(
138138
cond, file, line, func, __spirv_GlobalInvocationId_x(),
139139
__spirv_GlobalInvocationId_y(), __spirv_GlobalInvocationId_z(),

sycl/include/sycl/builtins.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,9 @@ extern __DPCPP_SYCL_EXTERNAL int __imf_vimin_s32_relu(int x, int y);
634634
}
635635
#ifdef __GLIBC__
636636
namespace std {
637-
extern __DPCPP_SYCL_EXTERNAL void __glibcxx_assert_fail(const char *file,
638-
int line,
639-
const char *func,
640-
const char *cond);
637+
extern __DPCPP_SYCL_EXTERNAL void
638+
__glibcxx_assert_fail(const char *file, int line, const char *func,
639+
const char *cond) noexcept;
641640
} // namespace std
642641
extern "C" {
643642
extern __DPCPP_SYCL_EXTERNAL void __assert_fail(const char *expr,

0 commit comments

Comments
 (0)