aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CrashRecoveryContext.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2020-01-29 16:21:08 +0100
committerHans Wennborg <hans@chromium.org>2020-01-29 16:35:07 +0100
commit31e07692d7f2b383bd64c63cd2b5c35b6503cf3a (patch)
tree443b87c0b8ebd4e0f9a5ab4de7bd79a60d92c686 /llvm/lib/Support/CrashRecoveryContext.cpp
parent24ab761a60b14cd8824be8d0769d842172ed0334 (diff)
downloadllvm-31e07692d7f2b383bd64c63cd2b5c35b6503cf3a.zip
llvm-31e07692d7f2b383bd64c63cd2b5c35b6503cf3a.tar.gz
llvm-31e07692d7f2b383bd64c63cd2b5c35b6503cf3a.tar.bz2
Work around PR44697 in CrashRecoveryContext
Diffstat (limited to 'llvm/lib/Support/CrashRecoveryContext.cpp')
-rw-r--r--llvm/lib/Support/CrashRecoveryContext.cpp7
1 files changed, 7 insertions, 0 deletions
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<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())) {