[PATCH] Use the correct ObjC++ personality

Jonathan Schleifer via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 26 09:13:33 PDT 2017


Use the correct EH personality for ObjC++ code.

Previously, it would just always use the ObjC DWARF personality, even with SjLj or SEH exceptions.

diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp
index 228efec51b..ca1535182e 100644
--- a/lib/CodeGen/CGException.cpp
+++ b/lib/CodeGen/CGException.cpp
@@ -180,8 +180,8 @@ static const EHPersonality &getObjCXXPersonality(const llvm::Triple &T,
  // The GCC runtime's personality function inherently doesn't support
  // mixed EH.  Use the C++ personality just to avoid returning null.
  case ObjCRuntime::GCC:
-  case ObjCRuntime::ObjFW: // XXX: this will change soon
-    return EHPersonality::GNU_ObjC;
+  case ObjCRuntime::ObjFW:
+    return getObjCPersonality(T, L);
  case ObjCRuntime::GNUstep:
    return EHPersonality::GNU_ObjCXX;
  }

--
Jonathan


More information about the cfe-commits mailing list