From a15e895cfd4e3ffeb4b3075b9f3591c6a60bfd9b Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Mon, 9 Mar 2020 11:45:31 -0400 Subject: [PATCH] Fix Windows build. extern "C" on Windows implies nothrow. We shouldn't be throwing exceptions either way. Change-Id: If0ed1f7ec194bf7f65b7cea1a5c250e768a8f190 --- hipamd/vdi/hip_rtc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hipamd/vdi/hip_rtc.cpp b/hipamd/vdi/hip_rtc.cpp index 8bac9ae361..1f9a6e1636 100644 --- a/hipamd/vdi/hip_rtc.cpp +++ b/hipamd/vdi/hip_rtc.cpp @@ -193,8 +193,12 @@ const char* hiprtcGetErrorString(hiprtcResult x) { case HIPRTC_ERROR_INTERNAL_ERROR: return "HIPRTC_ERROR_INTERNAL_ERROR"; default: - throw std::logic_error{"Invalid HIPRTC result."}; + return nullptr; }; + + ShouldNotReachHere(); + + return nullptr; } hiprtcResult hiprtcCreateProgram(hiprtcProgram* prog, const char* src, const char* name,