summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-31 17:58:15 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-31 18:00:29 +0000
commit3842b94c4e7292de5f9e368bd60c64fc084c1bbe (patch)
treecd3c53f5d0df19bd7cea8da654ec063498fdbfaa /llvm/lib/Target/Mips/Mips16InstrInfo.cpp
parent05a2d70d963b83f1ed68eddd91b017b5f0a0fa72 (diff)
downloadbcm5719-llvm-3842b94c4e7292de5f9e368bd60c64fc084c1bbe.tar.gz
bcm5719-llvm-3842b94c4e7292de5f9e368bd60c64fc084c1bbe.zip
Revert rG57ee0435bd47f23f3939f402914c231b4f65ca5e - [TII] Use optional destination and source pair as a return value; NFC
This is breaking MSVC builds: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/20375
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16InstrInfo.cpp')
-rw-r--r--llvm/lib/Target/Mips/Mips16InstrInfo.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
index e619b705584..0d735c20ec2 100644
--- a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
+++ b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
@@ -96,11 +96,15 @@ void Mips16InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
MIB.addReg(SrcReg, getKillRegState(KillSrc));
}
-Optional<DestSourcePair>
-Mips16InstrInfo::isCopyInstrImpl(const MachineInstr &MI) const {
- if (MI.isMoveReg())
- return DestSourcePair{MI.getOperand(0), MI.getOperand(1)};
- return None;
+bool Mips16InstrInfo::isCopyInstrImpl(const MachineInstr &MI,
+ const MachineOperand *&Src,
+ const MachineOperand *&Dest) const {
+ if (MI.isMoveReg()) {
+ Dest = &MI.getOperand(0);
+ Src = &MI.getOperand(1);
+ return true;
+ }
+ return false;
}
void Mips16InstrInfo::storeRegToStack(MachineBasicBlock &MBB,
OpenPOWER on IntegriCloud