diff options
author | Hans Wennborg <hans@chromium.org> | 2020-01-29 16:21:08 +0100 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-01-29 16:36:48 +0100 |
commit | 967658150edb2cbb860c19ce54ac1e216bdc8461 (patch) | |
tree | 0044fe8daa8a787511194a8705563a433b25632d /llvm/lib/Support/CrashRecoveryContext.cpp | |
parent | 9a174549742aae9e5bc9ab099cad849b0282f0e3 (diff) | |
download | bcm5719-llvm-967658150edb2cbb860c19ce54ac1e216bdc8461.tar.gz bcm5719-llvm-967658150edb2cbb860c19ce54ac1e216bdc8461.zip |
Work around PR44697 in CrashRecoveryContext
(cherry picked from commit 31e07692d7f2b383bd64c63cd2b5c35b6503cf3a)
Diffstat (limited to 'llvm/lib/Support/CrashRecoveryContext.cpp')
-rw-r--r-- | llvm/lib/Support/CrashRecoveryContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp index b9031f52375..510f46abe4b 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<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())) { |