From: Daniel Sanders Date: Tue, 6 Aug 2019 01:16:29 +0000 (+0000) Subject: Fix another MSVC issue after 367965 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6466fb3b8e4573bcc4b7789413560ca791791dda;p=llvm Fix another MSVC issue after 367965 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 --- diff --git a/include/llvm/CodeGen/Register.h b/include/llvm/CodeGen/Register.h index 73bca60ffcb..d1c4f471882 100644 --- a/include/llvm/CodeGen/Register.h +++ b/include/llvm/CodeGen/Register.h @@ -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