[PATCH] D28554: CodeGen: Add another method to MachineInstrBuilder. NFC
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 11 09:22:08 PST 2017
MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: include/llvm/CodeGen/MachineInstrBuilder.h:195
+ const MachineInstrBuilder &add(const ArrayRef<MachineOperand> MOs) const {
+ for (const auto &MO : MOs) {
----------------
The `const` is unnecessary for immutable classes like ArrayRef or StringRef (though it doesn't hurt either).
================
Comment at: include/llvm/CodeGen/MachineInstrBuilder.h:196
+ const MachineInstrBuilder &add(const ArrayRef<MachineOperand> MOs) const {
+ for (const auto &MO : MOs) {
+ MI->addOperand(*MF, MO);
----------------
`MachineOperand` instead of `auto` would be friendlier for readers.
https://reviews.llvm.org/D28554
More information about the llvm-commits
mailing list