[PATCH] D137939: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-22 Thread Stefan Gränitz via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9a9d636caeea: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push… (authored by sgraenitz). Repository: rG LLVM Github Mo

[PATCH] D137939: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137939/new/ https://reviews.llvm.org/D137939

[PATCH] D137939: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-17 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added inline comments. Comment at: clang/test/CodeGenObjCXX/arc-exceptions-seh.mm:36 +// CHECK: call +// CHECK: do_something +// CHECK: [ "funclet"(token [[CATCHPAD]]) ] rnk wrote: > Don't we need an exceptional cleanup her

[PATCH] D137939: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-17 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz updated this revision to Diff 476150. sgraenitz marked an inline comment as done. sgraenitz added a comment. Run test with -fobjc-arc-exceptions and check cleanup pads as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137939/new/ http

[PATCH] D137939: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Thanks, I can see the bug here: https://gcc.godbolt.org/z/1xjMYarT9 You can see how storeStrong cleanup uses the catchpad funclet when it should not. Comment at: clang/test/CodeGenObjCXX/arc-exceptions-seh.mm:36 +// CHECK: call +// CHECK:

[PATCH] D137939: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-14 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. The approach follows the C++ try/catch implementation in clang/lib/CodeGen/CGException.cpp . I think this is the correct solution for what I attempted to fix with D134866

[PATCH] D137939: [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early

2022-11-14 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz created this revision. sgraenitz added reviewers: theraven, rnk. Herald added a project: All. sgraenitz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Pushing the `CatchRetScope` early causes cleanups for catch parameters to be