How to get the next op of an op?

Hi, as the title says, what I want to do is simply find the next operation of a specific operation, and erase it.

However, I searched the doc but haven’t found an easy way to do it.

So I asked here to find it there will be a way instead of looping over the content.

Operations are stored in a linked list (llvm::iplist) and you can use Operation::getNextNode/ Operation::getPrevNode to navigate it.