]> granicus.if.org Git - llvm/commitdiff
Fix MSVC error after r367916
authorDaniel Sanders <daniel_l_sanders@apple.com>
Mon, 5 Aug 2019 20:03:43 +0000 (20:03 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Mon, 5 Aug 2019 20:03:43 +0000 (20:03 +0000)
It seems that MSVC sees ambiguity between the operator==()'s where clang
doesn't

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367920 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineBasicBlock.cpp

index d7e83286b59e47d0428e856bc3f8c18bf4caa666..46146bcfaad413284042fe71f53fb099544b47ad 100644 (file)
@@ -499,7 +499,7 @@ MachineBasicBlock::addLiveIn(MCPhysReg PhysReg, const TargetRegisterClass *RC) {
   // Look for an existing copy.
   if (LiveIn)
     for (;I != E && I->isCopy(); ++I)
-      if (I->getOperand(1).getReg() == PhysReg) {
+      if (I->getOperand(1).getReg() == Register(PhysReg)) {
         unsigned VirtReg = I->getOperand(0).getReg();
         if (!MRI.constrainRegClass(VirtReg, RC))
           llvm_unreachable("Incompatible live-in register class.");