[llvm] 31e0769 - Work around PR44697 in CrashRecoveryContext
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 07:35:26 PST 2020
Author: Hans Wennborg
Date: 2020-01-29T16:35:07+01:00
New Revision: 31e07692d7f2b383bd64c63cd2b5c35b6503cf3a
URL: https://github.com/llvm/llvm-project/commit/31e07692d7f2b383bd64c63cd2b5c35b6503cf3a
DIFF: https://github.com/llvm/llvm-project/commit/31e07692d7f2b383bd64c63cd2b5c35b6503cf3a.diff
LOG: Work around PR44697 in CrashRecoveryContext
Added:
Modified:
llvm/lib/Support/CrashRecoveryContext.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp
index b9031f52375c..510f46abe4b5 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())) {
More information about the llvm-commits
mailing list