[llvm-commits] [PATCH] fix a FIXME in SwitchInst::removeCase()
Chris Lattner
clattner at apple.com
Mon Jan 31 14:44:12 PST 2011
On Jan 31, 2011, at 7:24 AM, Jay Foad wrote:
> SwitchInst::removeCase() has this comment:
>
> // Move everything after this operand down.
> //
> // FIXME: we could just swap with the end of the list, then erase. However,
> // client might not expect this to happen. The code as it is thrashes the
> // use/def lists, which is kinda lame.
>
> I've looked at all calls to removeCase() in the LLVM tree, and I don't
> think any of them will care if the cases get reordered. So the
> attached patch implements the more efficient approach described in the
> comment, and removes the FIXME.
>
> Tested with "make check". OK to commit?
Looks good to me, please add a comment to the header file indicating that this can happen. Thanks Jay!
-Chris
More information about the llvm-commits
mailing list