diff options
Diffstat (limited to 'llvm/include/llvm/CodeGen/MachineFunction.h')
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineFunction.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h index 35305bd53b2..25edf5bcce5 100644 --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ b/llvm/include/llvm/CodeGen/MachineFunction.h @@ -372,16 +372,18 @@ public: public: virtual ~Delegate() = default; - virtual void MF_HandleInsertion(const MachineInstr &MI) = 0; - virtual void MF_HandleRemoval(const MachineInstr &MI) = 0; + /// Callback after an insertion. This should not modify the MI directly. + virtual void MF_HandleInsertion(MachineInstr &MI) = 0; + /// Callback before a removal. This should not modify the MI directly. + virtual void MF_HandleRemoval(MachineInstr &MI) = 0; }; private: Delegate *TheDelegate = nullptr; // Callbacks for insertion and removal. - void handleInsertion(const MachineInstr &MI); - void handleRemoval(const MachineInstr &MI); + void handleInsertion(MachineInstr &MI); + void handleRemoval(MachineInstr &MI); friend struct ilist_traits<MachineInstr>; public: |