[clang] Objective C: use C++ exceptions on MinGW+GNUstep (PR #77255)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 9 18:06:27 PST 2024


================
@@ -2210,7 +2219,11 @@ 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 (usesCxxExceptions) {
+    ExceptionReThrowFn.init(&CGM, "objc_exception_rethrow", VoidTy, IdTy);
----------------
compnerd wrote:

I would say that a ternary to select between the exception model and identify the name would be better as you are just selecting the label.

https://github.com/llvm/llvm-project/pull/77255


More information about the cfe-commits mailing list