================ @@ -2210,7 +2219,12 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion, // void objc_exception_throw(id); ExceptionThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); - ExceptionReThrowFn.init(&CGM, "objc_exception_throw", VoidTy, IdTy); + if ((CGM.getTarget().getTriple().isOSCygMing() && + isRuntime(ObjCRuntime::GNUstep, 2))) { + ExceptionReThrowFn.init(&CGM, "objc_exception_rethrow", VoidTy, IdTy); + } else { ---------------- qmfrederik wrote:
On MinGW + objc2, `objc_exception_rethrow` is called; on other targets, `objc_exception_throw` is used (**re**throw vs throw). I find it odd we were using `objc_exception_throw` to *re*throw an exception but decided to change it for MinGW+objc2 only. https://github.com/llvm/llvm-project/pull/77255 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits