From 31e07692d7f2b383bd64c63cd2b5c35b6503cf3a Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 29 Jan 2020 16:21:08 +0100 Subject: [PATCH] Work around PR44697 in CrashRecoveryContext --- llvm/lib/Support/CrashRecoveryContext.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp index b9031f5..510f46a 100644 --- a/llvm/lib/Support/CrashRecoveryContext.cpp +++ b/llvm/lib/Support/CrashRecoveryContext.cpp @@ -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 Fn, bool DumpStackAndCleanup, int &RetCode) { +#else +static bool InvokeFunctionCall(function_ref Fn, + bool DumpStackAndCleanup, int &RetCode) { +#endif __try { Fn(); } __except (ExceptionFilter(DumpStackAndCleanup, GetExceptionInformation())) { -- 2.7.4