]> granicus.if.org Git - llvm/commitdiff
Fix another MSVC issue after 367965
authorDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 6 Aug 2019 01:16:29 +0000 (01:16 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 6 Aug 2019 01:16:29 +0000 (01:16 +0000)
Repeated the fix for MCRegister in Register

This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115)

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

include/llvm/CodeGen/Register.h

index 73bca60ffcb4fb955a54c30fbc54a2052f3bbd73..d1c4f471882802c15bc7b426ae39370491f2c8a9 100644 (file)
@@ -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