[llvm-branch-commits] [llvm] 9676581 - Work around PR44697 in CrashRecoveryContext

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 29 07:37:06 PST 2020


Author: Hans Wennborg
Date: 2020-01-29T16:36:48+01:00
New Revision: 967658150edb2cbb860c19ce54ac1e216bdc8461

URL: https://github.com/llvm/llvm-project/commit/967658150edb2cbb860c19ce54ac1e216bdc8461
DIFF: https://github.com/llvm/llvm-project/commit/967658150edb2cbb860c19ce54ac1e216bdc8461.diff

LOG: Work around PR44697 in CrashRecoveryContext

(cherry picked from commit 31e07692d7f2b383bd64c63cd2b5c35b6503cf3a)

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-branch-commits mailing list