[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)
David Chisnall via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 8 00:25:42 PST 2024
================
@@ -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 {
----------------
davidchisnall wrote:
It looks as if both branches of the if and else here do the same thing?
https://github.com/llvm/llvm-project/pull/77255
More information about the cfe-commits
mailing list