diff options
author | Yuxuan Chen <yuxuanchen1997@outlook.com> | 2023-11-21 21:21:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 21:21:27 -0800 |
commit | 1fad78b123d20db675d339053e4265aceb07c4af (patch) | |
tree | 76e4ed3a6a8323db3acc0ae4cabbf2c2e64bd596 /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp | |
parent | 2c875719c841ff13b9b250e6ea97fc3e0aca2070 (diff) | |
download | llvm-1fad78b123d20db675d339053e4265aceb07c4af.zip llvm-1fad78b123d20db675d339053e4265aceb07c4af.tar.gz llvm-1fad78b123d20db675d339053e4265aceb07c4af.tar.bz2 |
[Clang][Coroutines] Properly emit EH code for initial suspend `await_resume` (#73073)
This change aims to fix an ICE in issue
https://github.com/llvm/llvm-project/issues/63803
The crash happens in `ExitCXXTryStmt` because `EmitAnyExpr()` adds
additional cleanup to the `EHScopeStack`. This messes up the assumption
in `ExitCXXTryStmt` that the top of the stack should be a
`EHCatchScope`.
However, since we never read a value returned from `await_resume()` of
an init suspend, we can skip the part that builds this `RValue`.
The code here may not be in the best shape. There's another bug that
`memberCallExpressionCanThrow` doesn't work on the current Expr due to
type mismatch. I am preparing a separate PR to address it plus some
refactoring might be beneficial.
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions