[PATCH] Use the correct ObjC++ personality

Jonathan Roelofs via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 26 09:17:38 PDT 2017



On 3/26/17 10:13 AM, Jonathan Schleifer via cfe-commits wrote:
> 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;
>   }
>

Testcase?

Jon

> --
> Jonathan
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded


More information about the cfe-commits mailing list