- Recurse from cleanupendpads to their cleanuppads, to make sure the cleanuppad is visited if it has a cleanupendpad but no cleanupret.
- Check for and avoid double-processing cleanuppads, to allow for them to have multiple cleanuprets (plus cleanupendpads).
- Update Cxx state numbering to visit toplevel cleanupendpads and to recurse from cleanupendpads to their preds, to ensure we number any funclets in inlined cleanups. SEH state numbering already did this.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Just a few things I noticed when going over this code in the process of using it as a template for CLR state numbering. I wanted to make sure we'd handle these cases in a consistent way, and it would have taken longer to try to explain than to just send this patch.
Comment Actions
I held off on doing this because Clang doesn't emit cleanupendpad for C++ destructors yet. This isn't usually problem because destructors are noexcept by default in C++11, so the cleanupendpad is unreachable *unless* someone explicitly declares a noexcept(false) destructor:
struct D { ~D() noexcept(false) { throw 42; } }; int main() { D o; throw 42; }
Let me deal with that and I'll get back to this.