[MC] [Win64EH] Simplify code using WinEH::Instruction::operator!=. NFC.

operator== and operator!= were added in
1308bb99e0 / D87369, but this existing
codepath wasn't updated to use them.

Also fix the indentation of the enclosed liens.

Differential Revision: https://reviews.llvm.org/D125368
This commit is contained in:
Martin Storsjö 2021-11-24 14:03:54 +02:00
parent 303638248a
commit 490cd14fe6
1 changed files with 3 additions and 5 deletions

View File

@ -532,11 +532,9 @@ FindMatchingEpilog(const std::vector<WinEH::Instruction>& EpilogInstrs,
bool Match = true;
for (unsigned i = 0; i < Instrs.size(); ++i)
if (Instrs[i].Operation != EpilogInstrs[i].Operation ||
Instrs[i].Offset != EpilogInstrs[i].Offset ||
Instrs[i].Register != EpilogInstrs[i].Register) {
Match = false;
break;
if (Instrs[i] != EpilogInstrs[i]) {
Match = false;
break;
}
if (Match)