[llvm] r367967 - Fix another MSVC issue after 367965

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 18:16:30 PDT 2019


Author: dsanders
Date: Mon Aug  5 18:16:29 2019
New Revision: 367967

URL: http://llvm.org/viewvc/llvm-project?rev=367967&view=rev
Log:
Fix another MSVC issue after 367965

Repeated the fix for MCRegister in Register

This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115)

Modified:
    llvm/trunk/include/llvm/CodeGen/Register.h

Modified: llvm/trunk/include/llvm/CodeGen/Register.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Register.h?rev=367967&r1=367966&r2=367967&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/Register.h (original)
+++ llvm/trunk/include/llvm/CodeGen/Register.h Mon Aug  5 18:16:29 2019
@@ -126,6 +126,9 @@ public:
   bool operator!=(unsigned Other) const { return Reg != Other; }
   bool operator==(int Other) const { return Reg == unsigned(Other); }
   bool operator!=(int Other) const { return Reg != unsigned(Other); }
+  // MSVC requires that we explicitly declare these two as well.
+  bool operator==(MCPhysReg Other) const { return Reg == unsigned(Other); }
+  bool operator!=(MCPhysReg Other) const { return Reg != unsigned(Other); }
 };
 
 // Provide DenseMapInfo for Register




More information about the llvm-commits mailing list