From 747922ce00691ce3a8f38a5c71444eb46847a11a Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Thu, 13 Jul 2017 13:48:59 +0300 Subject: [PATCH] Add one more workaround for LLVM bug 33220 --- runtime/src/main/cpp/Exceptions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/src/main/cpp/Exceptions.cpp b/runtime/src/main/cpp/Exceptions.cpp index 9f1e7693d8c..d3d1bb27e8d 100644 --- a/runtime/src/main/cpp/Exceptions.cpp +++ b/runtime/src/main/cpp/Exceptions.cpp @@ -157,6 +157,13 @@ OBJ_GETTER0(GetCurrentStackTrace) { void ThrowException(KRef exception) { RuntimeAssert(exception != nullptr && IsInstance(exception, theThrowableTypeInfo), "Throwing something non-throwable"); + +#if (__MINGW32__ || __MINGW64__) + // Workaround for https://bugs.llvm.org/show_bug.cgi?id=33220 + // This code forces the function to have at least one landingpad: + ObjHolder toBeDestructed(exception); +#endif + throw ObjHolder(exception); }