Work around PR44697 in CrashRecoveryContext

This commit is contained in:
Hans Wennborg 2020-01-29 16:21:08 +01:00
parent 24ab761a60
commit 31e07692d7
1 changed files with 7 additions and 0 deletions

View File

@ -195,8 +195,15 @@ static int ExceptionFilter(bool DumpStackAndCleanup,
return EXCEPTION_EXECUTE_HANDLER;
}
#if defined(__clang__) && defined(_M_IX86)
// Work around PR44697.
__attribute__((optnone))
static bool InvokeFunctionCall(function_ref<void()> Fn,
bool DumpStackAndCleanup, int &RetCode) {
#else
static bool InvokeFunctionCall(function_ref<void()> Fn,
bool DumpStackAndCleanup, int &RetCode) {
#endif
__try {
Fn();
} __except (ExceptionFilter(DumpStackAndCleanup, GetExceptionInformation())) {