[clang] [KeyInstr][Clang] Catch variable init atom (PR #134641)

Orlando Cazalet-Hyams via cfe-commits cfe-commits at lists.llvm.org
Fri May 23 05:16:56 PDT 2025


================
@@ -5055,6 +5055,7 @@ void ItaniumCXXABI::emitBeginCatch(CodeGenFunction &CGF,
 
   // Emit the local.
   CodeGenFunction::AutoVarEmission var = CGF.EmitAutoVarAlloca(*CatchParam);
+  ApplyAtomGroup Grp(CGF.getDebugInfo());
   InitCatchParam(CGF, *CatchParam, var.getObjectAddress(CGF), S->getBeginLoc());
   CGF.EmitAutoVarCleanups(var);
----------------
OCHyams wrote:

Yes if a few things were different and wrong. 1. Calls aren't annotated. 2. If they were, it would be a bug if whatever call handling code didn't have its own `ApplyAtomGroup` for the dtor.

I could add a scope around ApplyAtomGroup and InitCatchParam, and/or add more tests, if you think it would be useful?

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


More information about the cfe-commits mailing list