Skip to content

Commit 3f4137b

Browse files
committed
Make MSVC happy about try-catch dtor
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent e35a2c0 commit 3f4137b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

sycl/source/detail/device_image_impl.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ class ManagedDeviceGlobalsRegistry {
6666

6767
ManagedDeviceGlobalsRegistry(const ManagedDeviceGlobalsRegistry &) = delete;
6868

69-
~ManagedDeviceGlobalsRegistry() try {
70-
unregisterDeviceGlobalsFromContext();
71-
} catch (std::exception &e) {
72-
__SYCL_REPORT_EXCEPTION_TO_STREAM(
73-
"exception during unregistration of SYCL binaries", e);
69+
~ManagedDeviceGlobalsRegistry() {
70+
try {
71+
unregisterDeviceGlobalsFromContext();
72+
} catch (std::exception &e) {
73+
__SYCL_REPORT_EXCEPTION_TO_STREAM(
74+
"exception during unregistration of SYCL binaries", e);
75+
}
7476
}
7577

7678
bool hasDeviceGlobalName(const std::string &Name) const noexcept {

0 commit comments

Comments
 (0)