Factor the code that rewrites invokes to calls and rewrites WinEH
terminators to their "unwind to caller" equivalents into a helper in
Utils/Local, and use it in the three places I'm aware of that need to do
this.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Remove a stale comment and simplify the code that updates a removed cleanup's predecessors' outgoing edges. I looked at introducing EHTerminatorInst as suggested in the FIXME comment (D13184), but the complexity seemed unnecessary, especially since this case can be handled with replaceUsesOfWith.
Comment Actions
lgtm
Thanks for the refactor!
lib/Transforms/Utils/Local.cpp | ||
---|---|---|
1266 | I think each if here can be something like: NewTI = ...::Create(...); OldPad = ...->getUnwindDest(); And then you can share the name taking and edge erasing code for all the non-call terminators. |
I think each if here can be something like:
And then you can share the name taking and edge erasing code for all the non-call terminators.