When we enter a __finally block, the CGF's CurCodeDecl will be null
(because CodeGenFunction::StartFunction is given an empty GlobalDecl for
a __finally block), and so the dyn_cast here will result in an assertion
failure. Change it to dyn_cast_or_null to handle this case.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/CodeGen/exceptions-seh-finally.c | ||
---|---|---|
281 ↗ | (On Diff #142025) | How stable is the mangling here? I included the complete call instruction because I wanted to ensure that the value of __func__ inside a __finally block reflects the parent function, not the outlined funclet, and both the [18 x i8] and the mangled string name are pretty good proxies for that. I can generalize it more if it'll make the test more reliable though. |
Comment Actions
lgtm, thanks!
test/CodeGen/exceptions-seh-finally.c | ||
---|---|---|
281 ↗ | (On Diff #142025) | It's pretty stable. |